Launch early, even if not ready

Summary:
Flipper Launcher downloads, unpacks, launches Flipper, and closes itself.

This is fine except for the fact that Flipper may be initiating and thus there's a gap of a few seconds until engineers see the main Flipper UI.

This change improves this by launching earlier, even if just showing a loading page until Flipper is actually ready.

Reviewed By: passy, aigoncharov

Differential Revision: D48824479

fbshipit-source-id: aa6147a09f313d80592c9b08d089660ba73773a4
This commit is contained in:
Lorenzo Blasa
2023-08-30 05:08:26 -07:00
committed by Facebook GitHub Bot
parent 3e8f94ceda
commit 2858259497
3 changed files with 84 additions and 7 deletions

View File

@@ -215,6 +215,9 @@ async function start() {
`[flipper-server][bootstrap] HTTP server started (${httpServerStartedMS} ms)`,
);
// At this point, the HTTP server is ready and listening.
launch();
const flipperServer = await startFlipperServer(
rootPath,
staticPath,
@@ -342,7 +345,7 @@ process.on('unhandledRejection', (reason, promise) => {
});
start()
.then(launch)
.then(() => {})
.catch((e) => {
console.error(chalk.red('Server startup error: '), e);
process.exit(1);