use PORT and HOST environment variables

This commit is contained in:
hazycora 2023-08-03 02:17:05 -05:00
parent 2a6b2171f5
commit ae0e13eb8d
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E

View file

@ -108,4 +108,8 @@ app.get('/:owner/:repo/issue/:num', async function (req, res) {
res.send(await render(html)) res.send(await render(html))
}) })
app.listen(8085) const [port, host] = [process.env.PORT ?? 9054, process.env.HOST ?? '127.0.0.1']
app.listen(port, host, () => {
console.log(`Listening on http://${host}:${port}`)
})