Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,12 @@ const { version } = require('../package.json')
// Sentry error handler
Sentry.setupExpressErrorHandler(app)

await new Promise((resolve) =>
app.listen({ port: PORT }, resolve as () => void)
)
console.log(`🚀 Server ready at http://localhost:${PORT}/graphql`)
const httpServer = app.listen({ port: PORT }, () => {
console.log(`🚀 Server ready at http://localhost:${PORT}/graphql`)
})

// Keep server keep-alive longer than nginx upstream to avoid reusing
// connections the server already closed (connection reset by peer).
httpServer.keepAliveTimeout = 65000
httpServer.headersTimeout = 66000
})()
Loading