Shutdown command

Summary:
Introduce a 'shutdown' command which effectively kills the process.

Killing the process, for flipper-server, will close down the server and active ws connections.

Reviewed By: passy

Differential Revision: D37209193

fbshipit-source-id: 83303e8209530a41ba870009603cfb383915b7a6
This commit is contained in:
Lorenzo Blasa
2022-06-21 04:46:42 -07:00
committed by Facebook GitHub Bot
parent 3e72831699
commit 2e9ab310bd
2 changed files with 4 additions and 0 deletions

View File

@@ -478,6 +478,9 @@ export class FlipperServerImpl implements FlipperServer {
return internGraphGETAPIRequest(endpoint, params, options, token);
},
'intern-upload-scribe-logs': sendScribeLogs,
shutdown: async () => {
process.exit(0);
},
};
registerDevice(device: ServerDevice) {