Skip to content
This repository was archived by the owner on Apr 16, 2024. It is now read-only.

Commit 8bde785

Browse files
authored
Merge pull request #613 from 52871299hzy/master
Added customizable host.
2 parents c0ff65b + 9bf9ddd commit 8bde785

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,10 @@ fs.readdirSync(path.join(__dirname, 'module')).reverse().forEach(file => {
8383
})
8484

8585
const port = process.env.PORT || 3000
86+
const host = process.env.HOST || 'localhost'
8687

87-
app.server = app.listen(port, () => {
88-
console.log(`server running @ http://localhost:${port}`)
88+
app.server = app.listen(port, host, () => {
89+
console.log(`server running @ http://${host}:${port}`)
8990
})
9091

9192
module.exports = app

0 commit comments

Comments
 (0)