2020-08-22 13:17:31 +00:00
|
|
|
const {Pinski} = require("pinski")
|
|
|
|
const {setInstance} = require("pinski/plugins")
|
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
;(async () => {
|
2020-09-23 12:05:02 +00:00
|
|
|
await require("./utils/upgradedb")()
|
2020-08-22 13:17:31 +00:00
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
const server = new Pinski({
|
2020-08-31 13:24:34 +00:00
|
|
|
port: 10412,
|
2020-08-30 13:54:59 +00:00
|
|
|
relativeRoot: __dirname,
|
|
|
|
filesDir: "html"
|
|
|
|
})
|
2020-08-22 13:17:31 +00:00
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
setInstance(server)
|
2020-08-22 13:17:31 +00:00
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
server.addSassDir("sass", ["sass/includes"])
|
|
|
|
server.addRoute("/static/css/main.css", "sass/main.sass", "sass")
|
2020-08-22 13:17:31 +00:00
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
server.addPugDir("pug", ["pug/includes"])
|
|
|
|
server.addRoute("/", "pug/home.pug", "pug")
|
2020-08-22 13:17:31 +00:00
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
server.addStaticHashTableDir("html/static/js")
|
|
|
|
server.addStaticHashTableDir("html/static/js/elemjs")
|
2020-08-30 15:14:05 +00:00
|
|
|
server.addStaticHashTableDir("html/static/images")
|
|
|
|
server.addStaticHashTableDir("html/static/fonts")
|
2020-08-22 13:17:31 +00:00
|
|
|
|
2020-08-30 13:54:59 +00:00
|
|
|
server.addAPIDir("api")
|
|
|
|
|
|
|
|
server.startServer()
|
2020-08-31 13:22:16 +00:00
|
|
|
|
|
|
|
require("./background/feed-update")
|
2020-08-30 13:54:59 +00:00
|
|
|
})()
|