18 lines
384 B
JavaScript
18 lines
384 B
JavaScript
const express = require('express');
|
|
|
|
// Invoke express app
|
|
const app = express();
|
|
|
|
const APIRoutes = require('./routes/api');
|
|
const Loggerware = require('./middleware/Logger');
|
|
|
|
// Set up middleware
|
|
app.use(Loggerware);
|
|
|
|
// Set up API routes
|
|
app.use(APIRoutes);
|
|
|
|
// Listen on port 5000
|
|
app.listen(5000, () => {
|
|
console.log('Server is listening on port 5000');
|
|
}); |