Skip to content

Commit

Permalink
fix: local server was not started correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
thantos committed Sep 15, 2023
1 parent 9b9c56d commit 6101038
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/@eventual/cli/src/commands/local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,10 @@ export const local = (yargs: Argv) =>
return;
}
const query: SocketQuery = {};
new URL(request.url).searchParams.forEach(
(value, name) => (query[name] = value)
);
new URL(
request.url,
`http://${request.headers.host}`
).searchParams.forEach((value, name) => (query[name] = value));
const headers = Object.fromEntries(
Object.entries(request.headers).map(([name, value]) => [
name,
Expand Down Expand Up @@ -275,7 +276,7 @@ export const local = (yargs: Argv) =>
);
}

app.listen(port, () => {
server.listen(port, () => {
process.send?.("ready");
});

Expand Down

0 comments on commit 6101038

Please sign in to comment.