mirror of
https://gitlab.com/Binaryify/neteasecloudmusicapi.git
synced 2025-05-23 22:37:41 +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:
parent
c0ff65b8d4
commit
9bf9ddd199
5
app.js
5
app.js
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user