fix hostname binding and static file serving
This commit is contained in:
parent
2eaa6da971
commit
190449e971
1 changed files with 5 additions and 4 deletions
|
@ -6,11 +6,12 @@ const env = {
|
||||||
}
|
}
|
||||||
|
|
||||||
const server = pogo.server({
|
const server = pogo.server({
|
||||||
port: env.port
|
port: env.port,
|
||||||
|
hostname: "0.0.0.0"
|
||||||
})
|
})
|
||||||
|
|
||||||
server.router.get('/public/{file*}', (r, h) => {
|
server.router.get('/static/{file*}', (r, h) => {
|
||||||
return h.directory("./public/")
|
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()
|
await server.start()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue