Expose info endpoint

Summary:
Expose an endpoint to retrieve server environment information.

We can use version information and process number to aid engineers with troubleshooting Flipper.

Reviewed By: antonk52

Differential Revision: D49537325

fbshipit-source-id: 511fe4441638f91cd35f13706ceeeb515051416b
This commit is contained in:
Lorenzo Blasa
2023-09-22 08:17:48 -07:00
committed by Facebook GitHub Bot
parent db07297e2d
commit bdf5065f10
3 changed files with 31 additions and 13 deletions

View File

@@ -175,11 +175,14 @@ async function start() {
`[flipper-server][bootstrap] Check for running instances completed (${runningInstanceShutdownMS} ms)`,
);
const {app, server, socket, readyForIncomingConnections} = await startServer({
staticPath,
entry: `index.web${argv.bundler ? '.dev' : ''}.html`,
port: argv.port,
});
const {app, server, socket, readyForIncomingConnections} = await startServer(
{
staticPath,
entry: `index.web${argv.bundler ? '.dev' : ''}.html`,
port: argv.port,
},
environmentInfo,
);
const t4 = performance.now();
const httpServerStartedMS = t4 - t3;