blob: c849335faa6471e058f77738460ae926e0090d73 (
plain) (
blame)
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
35
36
|
const config = require('../config.js')
const routes = require('express').Router()
const path = require('path')
let options = {
root: 'pages/',
dotfiles: 'deny',
headers: {
'x-timestamp': Date.now(),
'x-sent': true
}
}
routes.get('/', (req, res) => {
res.sendFile('home.html', options, function (err) {
if (err) {
console.log(err)
res.status(err.status).end()
}
})
})
routes.get('/panel', function (req, res, next) {
res.sendFile('panel.html', options, function (err) {
if (err) {
console.log(err)
res.status(err.status).end()
}
})
})
module.exports = routes
|