Rename and documentation for start dev server (attach)

Summary:
Same as with the previous diff.

The function doesn't really start a server. Instead it attaches the routing of messages from the existing server into FlipperServer.

Reviewed By: passy

Differential Revision: D36310703

fbshipit-source-id: 7ac9a742fb36c3806597382c9aadcf96f4770484
This commit is contained in:
Lorenzo Blasa
2022-05-11 06:56:20 -07:00
committed by Facebook GitHub Bot
parent 582966d139
commit 242d26e199
2 changed files with 8 additions and 3 deletions

View File

@@ -26,7 +26,12 @@ import {
} from 'flipper-server-companion';
import {URLSearchParams} from 'url';
export function startSocketServer(
/**
* Attach and handle incoming messages from clients.
* @param flipperServer A FlipperServer instance.
* @param socket A ws socket on which to listen for events.
*/
export function attachSocketServer(
flipperServer: FlipperServerImpl,
socket: WebSocketServer,
companionEnv: FlipperServerCompanionEnv,

View File

@@ -12,7 +12,7 @@ import chalk from 'chalk';
import path from 'path';
import {startFlipperServer} from './startFlipperServer';
import {startServer} from './startServer';
import {startSocketServer} from './startSocketServer';
import {attachSocketServer} from './attachSocketServer';
import {attachDevServer} from './attachDevServer';
import yargs from 'yargs';
@@ -102,7 +102,7 @@ async function start() {
if (argv.bundler) {
await attachDevServer(app, server, socket, rootDir);
}
startSocketServer(flipperServer, socket, companionEnv);
attachSocketServer(flipperServer, socket, companionEnv);
}
start()