Fix Loading page
Summary: The existing loading page was not behaving the way it was intended. The previous implementation triggered a page reload which made the whole retry mechanism useless. Instead, a new endpoint was defined to expose whether the server is ready or not. Use this instead as a way of knowing whether we are good to reload the page. Reviewed By: passy Differential Revision: D49314749 fbshipit-source-id: eb67765d7deab8610fa5d31e710070da43a18c1c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
045ccec154
commit
9e219b07d8
@@ -128,6 +128,11 @@ async function startHTTPServer(config: Config): Promise<{
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/ready', (_req, res) => {
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.end(JSON.stringify({isReady}));
|
||||
});
|
||||
|
||||
app.get('/health', (_req, res) => {
|
||||
res.end('flipper-ok');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user