aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.env.example1
-rw-r--r--index.js2
2 files changed, 2 insertions, 1 deletions
diff --git a/.env.example b/.env.example
index 980afd3..ca2f89b 100644
--- a/.env.example
+++ b/.env.example
@@ -1,2 +1,3 @@
+PORT=8080
DB_CONN=mongodb://localhost/playground_db
APP_SECRET=replace-this
diff --git a/index.js b/index.js
index 4a55a0f..2d4f1a2 100644
--- a/index.js
+++ b/index.js
@@ -36,4 +36,4 @@ app.use(express.urlencoded({extended: false}));
app.use('/', webRoutes);
-app.listen(8080, () => console.log('Server started on port 8080.'));
+app.listen(process.env.PORT, () => console.log(`Server started on port ${process.env.PORT}.`));