-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.js
More file actions
34 lines (25 loc) · 687 Bytes
/
server.js
File metadata and controls
34 lines (25 loc) · 687 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
const express = require("express");
const indexRouter = require('./routes/index');
const timeRouter = require('./routes/time');
const srdRouter = require('./routes/srd');
const app = express();
const getSRD = require('./services/getSRD');
app.use(express.json());
app.use(
express.urlencoded({
extended: false,
}),
);
app.use('/', indexRouter);
app.use('/time', timeRouter);
app.use('/srd', srdRouter);
let port = process.env.PORT;
if (port == null || port == "") {
port = 3000;
}
app.listen(port, () => {
console.log("App running on port " + port);
});
getSRD();
module.exports = app;
// http://www.nats-uk.ead-it.com/aip/current/srd/SRD_Spreadsheet.xls