-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.js
21 lines (19 loc) · 928 Bytes
/
server.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const express = require('express');
const routes = require('./config/routes');
const bodyParser = require('body-parser');
// =============================================================================
// Server Configuration
// =============================================================================
const app = express();
const PORT = process.env.PORT || 8080;
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));
// =============================================================================
// Routing
// =============================================================================
app.use('/', routes);
require('./config/test');
// =============================================================================
// Start Server
// =============================================================================
app.listen(PORT, () => console.log(`Server is listening on port ${PORT}`));