Skip to content

Commit ebcfd92

Browse files
chore: using the param instead of calling a function (#1224)
1 parent 545c1f4 commit ebcfd92

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.changeset/cold-lamps-shave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@spotlightjs/spotlight": patch
3+
---
4+
5+
Instead of calling a function, we are now using the param value for the port on which the server is running

packages/spotlight/src/server/main.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,10 @@ export async function startServer(options: StartServerOptions): Promise<Server>
103103
fetch: app.fetch,
104104
port,
105105
},
106-
() => {
107-
const realPort = (server.address() as AddressInfo).port;
108-
logger.info(`Spotlight listening on ${realPort}`);
106+
info => {
107+
logger.info(`Spotlight listening on ${info.port}`);
109108
if (basePath) {
110-
logSpotlightUrl(realPort);
109+
logSpotlightUrl(info.port);
111110
}
112111
resolve(server as Server);
113112
},

0 commit comments

Comments
 (0)