Use centralized env export with validator function

This commit is contained in:
rijkvanzanten
2020-08-04 13:10:49 -04:00
parent 260b66f57c
commit 2252d5a35f
18 changed files with 131 additions and 69 deletions

View File

@@ -1,12 +1,10 @@
import logger from '../../logger';
import dotenv from 'dotenv';
export default async function start() {
dotenv.config();
const env = require('../../env').default;
const app = require('../../app').default;
const port = process.env.PORT;
const port = env.PORT;
app.listen(port, () => {
logger.info(`Server started at port ${port}`);