Set server timeout to 20s

This commit is contained in:
Michael Jackson 2016-06-13 00:10:07 -07:00
parent 2b9ffd90f9
commit b4ee49b9b3
1 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,11 @@ export const startServer = (serverConfig) => {
? createServer(config)
: createDevServer(config)
// Max request timeout on Heroku is 30s, so set our
// timeout to 20s to make sure we don't hang.
// https://devcenter.heroku.com/articles/request-timeout
server.timeout = 20000
server.listen(config.port, () => {
console.log('Server #%s listening on port %s, Ctrl+C to stop', config.id, config.port)
})