From af3f42397dcc152c5a76131576a80d4291128549 Mon Sep 17 00:00:00 2001 From: sundowndev Date: Tue, 13 Nov 2018 18:48:56 +0100 Subject: [PATCH] Entry point --- index.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d047037..ff252bf 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,5 @@ +require('./app/db/db.connect'); + const express = require('express'); const routes = require('./app/routes'); @@ -7,10 +9,10 @@ const port = process.env.PORT || 8080; // set our port app.use('/', routes); -app.use(function(req, res) { - res.status(404).json({ message: 'Resource not found.' }); +app.use((req, res) => { + res.status(404).json({ message: 'Resource not found.' }); }); // Start the server app.listen(port); -console.log('Server started on port ' + port); +console.log(`Server started on port ${port}`);