aboutsummaryrefslogtreecommitdiff
path: root/lolisafe.js
diff options
context:
space:
mode:
authorkanadeko <[email protected]>2017-01-17 15:55:27 -0300
committerkanadeko <[email protected]>2017-01-17 15:55:27 -0300
commit54e73085c68804e83b8a72ae1cb9a9982eaddb06 (patch)
treecd2c599f03c0a55cd04d367bdfff3044df50f5ba /lolisafe.js
parenttoken handling and verification (diff)
downloadhost.fuwn.me-54e73085c68804e83b8a72ae1cb9a9982eaddb06.tar.xz
host.fuwn.me-54e73085c68804e83b8a72ae1cb9a9982eaddb06.zip
Removed extra routes, moved static to main file
Diffstat (limited to 'lolisafe.js')
-rw-r--r--lolisafe.js16
1 files changed, 13 insertions, 3 deletions
diff --git a/lolisafe.js b/lolisafe.js
index 082ccef..fffe9a7 100644
--- a/lolisafe.js
+++ b/lolisafe.js
@@ -1,6 +1,5 @@
const config = require('./config.js')
const api = require('./routes/api.js')
-const routes = require('./routes/routes.js')
const express = require('express')
const db = require('knex')(config.database)
const fs = require('fs')
@@ -19,12 +18,23 @@ if( prefix !== '' )
safe.use('/' + prefix, express.static('./uploads'))
safe.use('/', express.static('./public'))
-safe.use('/', routes)
safe.use('/api', api)
+safe.get('/', function (req, res, next) {
+ res.sendFile('home.html', {
+ root: './pages/'
+ })
+})
+
+safe.get('/panel', function (req, res, next) {
+ res.sendFile('panel.html', {
+ root: './pages/'
+ })
+})
+
safe.use(function (req, res, next) {
res.status(404).sendFile('404.html', {
- root: './public/error/',
+ root: './pages/error/',
})
})