Add simple handling of SIGINT/SIGTERM for Docker
This commit is contained in:
parent
0978bbd25b
commit
c7030bd3bb
@ -4,11 +4,12 @@ if (!process.env.DEBUG) {
|
||||
}
|
||||
|
||||
import _debug from 'debug'
|
||||
import forEach from 'lodash/forEach'
|
||||
import { io } from './server/app'
|
||||
import app from './server/app'
|
||||
|
||||
const debug = _debug('peercalls')
|
||||
|
||||
const port = process.env.PORT || 3000
|
||||
app.listen(port, () => debug('Listening on: %s', port))
|
||||
|
||||
process.on('SIGINT', () => process.exit())
|
||||
process.on('SIGTERM', () => process.exit())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user