Skip to content

Commit 4142304

Browse files
authored
fix(cli): log address:port when starting dev server (#3873)
1 parent e73fd85 commit 4142304

File tree

3 files changed

+17
-3
lines changed

3 files changed

+17
-3
lines changed

.changeset/green-tools-heal.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@rnx-kit/cli": patch
3+
---
4+
5+
Log the address/port when starting dev server

packages/cli/src/serve/keyboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export function attachKeyHandlers(server: HttpServer, params: Params) {
6767
openDebuggerKeyboardHandler.dismiss();
6868
process.stdin.pause();
6969
process.stdin.setRawMode(false);
70-
info("Exiting...");
70+
info("Closing all connections...");
7171

7272
const httpServer = server.httpServer ?? server;
7373
httpServer.close();

packages/cli/src/start.ts

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,17 @@ export async function rnxStart(
184184
update(event: ReportableEvent) {
185185
terminalReporter.update(event);
186186
reportEventDelegate?.(event);
187-
if (interactive && event.type === "dep_graph_loading") {
188-
help();
187+
switch (event.type) {
188+
case "dep_graph_loading":
189+
if (interactive) {
190+
help();
191+
}
192+
break;
193+
case "server_listening":
194+
logger.info(
195+
`Dev server is listening on ${scheme}://${event.address}:${event.port}`
196+
);
197+
break;
189198
}
190199
},
191200
};

0 commit comments

Comments
 (0)