stupid shit

This commit is contained in:
Evert Prants 2019-02-26 12:06:47 +02:00
parent ff6d63a862
commit 2faffdf8c0
Signed by: evert
GPG Key ID: 1688DA83D222D0B5
3 changed files with 7 additions and 5 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/*/**/config.json
/node_modules/
/package-lock.json
*.html

View File

@ -0,0 +1 @@
*.html

View File

@ -67,14 +67,14 @@ async function init () {
return next()
}
let in = config.index
if (in.indexOf('/') !== 0) {
in = path.join(__dirname, in)
let inp = config.index
if (inp.indexOf('/') !== 0) {
inp = path.join(__dirname, inp)
} else {
in = path.resolve(in)
inp = path.resolve(inp)
}
res.sendFile(in)
res.sendFile(inp)
})
return router