fix hostname binding and static file serving

This commit is contained in:
Joshua 2022-09-15 00:01:30 +02:00
parent 2eaa6da971
commit 190449e971

View file

@ -6,11 +6,12 @@ const env = {
}
const server = pogo.server({
port: env.port
port: env.port,
hostname: "0.0.0.0"
})
server.router.get('/public/{file*}', (r, h) => {
return h.directory("./public/")
server.router.get('/static/{file*}', (r, h) => {
return h.directory("./src/static/")
})
@ -23,6 +24,6 @@ routes.forEach(route => {
console.log(`Dreamland (should be) online on Port ${env.port}`)
console.log(`Dreamland (should be) online on 0.0.0.0:${env.port}`)
await server.start()