mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2024-12-13 16:06:21 +00:00
36 lines
597 B
JavaScript
36 lines
597 B
JavaScript
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 |