Entry point
parent
7b29aedf2c
commit
af3f42397d
6
index.js
6
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) {
|
||||
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}`);
|
||||
|
|
Loading…
Reference in New Issue