UDS/TCP options

Summary:
Provide an option to enable/disable TCP connections on flipper-server.

The only change at this stage is that Flipper Desktop will use UDS to connect to flipper-server.

Reviewed By: passy

Differential Revision: D37519656

fbshipit-source-id: 3d02084666fde532ec76134edf8cf6a231060a48
This commit is contained in:
Lorenzo Blasa
2022-06-29 15:01:05 -07:00
committed by Facebook GitHub Bot
parent f46cf2b0ce
commit 646b9d5a5d
9 changed files with 110 additions and 35 deletions

View File

@@ -603,7 +603,11 @@ export function sleep(ms: number) {
let proc: child.ChildProcess | undefined;
export async function launchServer(startBundler: boolean, open: boolean) {
export async function launchServer(
startBundler: boolean,
open: boolean,
tcp: boolean,
) {
if (proc) {
console.log('⚙️ Killing old flipper-server...');
proc.kill(9);
@@ -617,6 +621,7 @@ export async function launchServer(startBundler: boolean, open: boolean) {
`../flipper-server/server.js`,
startBundler ? `--bundler` : `--no-bundler`,
open ? `--open` : `--no-open`,
tcp ? `--tcp` : `--no-tcp`,
],
{
cwd: serverDir,