Entry point

pull/1/head
sundowndev 2018-11-13 18:48:56 +01:00
parent 7b29aedf2c
commit af3f42397d
1 changed files with 5 additions and 3 deletions

View File

@ -1,3 +1,5 @@
require('./app/db/db.connect');
const express = require('express'); const express = require('express');
const routes = require('./app/routes'); const routes = require('./app/routes');
@ -7,10 +9,10 @@ const port = process.env.PORT || 8080; // set our port
app.use('/', routes); app.use('/', routes);
app.use(function(req, res) { app.use((req, res) => {
res.status(404).json({ message: 'Resource not found.' }); res.status(404).json({ message: 'Resource not found.' });
}); });
// Start the server // Start the server
app.listen(port); app.listen(port);
console.log('Server started on port ' + port); console.log(`Server started on port ${port}`);