Skip to content

Commit

Permalink
notify main dev process when server is ready (#96332)
Browse files Browse the repository at this point in the history
* notify main dev process when server is ready

* check for process.send existence
  • Loading branch information
pgayvallet authored Apr 6, 2021
1 parent 8227ece commit 7f97f8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/server/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ export async function bootstrap({ configs, cliArgs, applyConfigOverrides }: Boot
try {
await root.setup();
await root.start();

// notify parent process know when we are ready for dev mode.
if (process.send) {
process.send(['SERVER_LISTENING']);
}
} catch (err) {
await shutdown(err);
}
Expand Down

0 comments on commit 7f97f8b

Please sign in to comment.