-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
29 lines (21 loc) · 583 Bytes
/
index.js
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
const express = require('express')
var path = require('path');
const PORT = process.env.PORT || 3000
const HOST = '0.0.0.0'
// !* Edit here for demos
const RELEASE_NO = 'PROD-136'
const api = express()
api.set('views', path.join(__dirname, 'views'));
api.set('view engine', 'pug');
api.use(express.static(path.join(__dirname, 'public')));
api.get('/', (req, res) => {
res.render('index', {
release_no: RELEASE_NO
})
})
api.listen(PORT, HOST)
console.log(`Running on http://${HOST}:${PORT}`)
// Handle SIGINT (Ctrl+C)
process.on('SIGINT', () => {
process.exit(0);
})