From ab87bf915cbef62d5032b47540e593442c780193 Mon Sep 17 00:00:00 2001 From: Carson Fleming Date: Fri, 20 Oct 2023 00:11:37 -0400 Subject: Change config format --- index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'index.js') diff --git a/index.js b/index.js index db64231..ac4893a 100644 --- a/index.js +++ b/index.js @@ -6,7 +6,7 @@ const apiRoutes = require('./api-routes.js'); async function serve() { try { - await mongoose.connect(config.MONGO_URI, { + await mongoose.connect(config.MONGO, { useNewUrlParser: true, useUnifiedTopology: true }); @@ -27,8 +27,7 @@ async function serve() { app.use('/api', apiRoutes); app.use('/', routes); - const PORT = config.PORT || 80; - app.listen(PORT, () => { + app.listen(config.BIND || 8080, () => { console.log('[express] Webserver started.'); }); } -- cgit v1.2.3