未验证 提交 8bde7859 编写于 作者: B binaryify 提交者: GitHub

Merge pull request #613 from 52871299hzy/master

Added customizable host.
......@@ -83,9 +83,10 @@ fs.readdirSync(path.join(__dirname, 'module')).reverse().forEach(file => {
})
const port = process.env.PORT || 3000
const host = process.env.HOST || 'localhost'
app.server = app.listen(port, () => {
console.log(`server running @ http://localhost:${port}`)
app.server = app.listen(port, host, () => {
console.log(`server running @ http://${host}:${port}`)
})
module.exports = app
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册