Skip to content

Commit 7a39418

Browse files
committed
bin: bind to PORT
1 parent 1192003 commit 7a39418

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bin/update-server.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const assert = require('assert')
1414
// Args
1515
//
1616

17-
const { TOKEN: token, REDIS_URL: redisUrl } = process.env
17+
const { TOKEN: token, REDIS_URL: redisUrl, PORT: port = 3000 } = process.env
1818
assert(token, 'TOKEN required')
1919

2020
//
@@ -43,6 +43,6 @@ const cache = {
4343
//
4444

4545
const updates = new Updates({ token, cache })
46-
const server = updates.listen(3000, () => {
47-
console.log(`http://localhost:${server.address().port}`)
46+
updates.listen(port, () => {
47+
console.log(`http://localhost:${port}`)
4848
})

0 commit comments

Comments
 (0)