From 16fc976d694dc72dae8e6734a3c136d701294ff8 Mon Sep 17 00:00:00 2001 From: Rafael Makaha Date: Thu, 8 Oct 2020 15:01:13 -0300 Subject: [PATCH] Remove config folder and update index.js --- src/config/index.js | 5 ----- src/index.js | 3 +-- 2 files changed, 1 insertion(+), 7 deletions(-) delete mode 100644 src/config/index.js diff --git a/src/config/index.js b/src/config/index.js deleted file mode 100644 index aef1de3..0000000 --- a/src/config/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - app : { - port: process.env.PORT || 3000, - }, -}; \ No newline at end of file diff --git a/src/index.js b/src/index.js index 49c4596..749ce3d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,3 @@ -require('dotenv').config(); -const config = require('./config') const express = require('express'); const app = express(); const morgan = require('morgan'); @@ -37,6 +35,7 @@ app.use('/comment',commentRoutes); app.use('/auth',authRoutes); // starting the server +app.set('port', process.env.PORT || 3000); app.listen(app.get('port'), () => { console.log(`Server on port ${app.get('port')}`); });