We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 29fe141 + 1e7af2a commit 25a6faeCopy full SHA for 25a6fae
1 file changed
server.js
@@ -18,8 +18,14 @@ if (!module.parent) {
18
if (status === false) {
19
// If in a deployed environment, warm the server at the start
20
if (process.env.NODE_ENV === 'production') {
21
- // If in a production environment, wait for the cache to be fully warmed.
22
- await warmServer()
+ // If in a true production environment, wait for the cache to be fully warmed.
+ if (process.env.HEROKU_PRODUCTION_APP || process.env.GITHUB_ACTIONS) {
23
+ await warmServer()
24
+ } else {
25
+ // If not in a true production environment, don't wait for the cache to be fully warmed.
26
+ // This avoids deployment timeouts in environments with slower servers.
27
+ warmServer()
28
+ }
29
}
30
31
// workaround for https://github.com/expressjs/express/issues/1101
0 commit comments