mirror of
https://github.com/NeteaseCloudMusicApiEnhanced/api-enhanced.git
synced 2026-10-20 14:41:23 +08:00
Added customizable host.
Use 'HOST=0.0.0.0 node app.js' to listen on all ip's.
This commit is contained in:
@@ -83,9 +83,10 @@ fs.readdirSync(path.join(__dirname, 'module')).reverse().forEach(file => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const port = process.env.PORT || 3000
|
const port = process.env.PORT || 3000
|
||||||
|
const host = process.env.HOST || 'localhost'
|
||||||
|
|
||||||
app.server = app.listen(port, () => {
|
app.server = app.listen(port, host, () => {
|
||||||
console.log(`server running @ http://localhost:${port}`)
|
console.log(`server running @ http://${host}:${port}`)
|
||||||
})
|
})
|
||||||
|
|
||||||
module.exports = app
|
module.exports = app
|
||||||
|
|||||||
Reference in New Issue
Block a user