Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Stabilize Deno.serve() API #19141

Merged
merged 14 commits into from
Jul 3, 2023
Prev Previous commit
Next Next commit
always bind to port 8000 by default
  • Loading branch information
bartlomieju committed Jul 3, 2023
commit a7b3b80961b1ddf78577141be392a9a195ab5b89
6 changes: 3 additions & 3 deletions cli/tests/unit/serve_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3077,16 +3077,16 @@ Deno.test(

assertEquals(
"hello world!",
await curlRequest(["https://localhost:9000/path", "-k"]),
await curlRequest(["https://localhost:8000/path", "-k"]),
);
assertEquals(
"hello world!",
await curlRequest(["https://localhost:9000/path", "-k", "--http2"]),
await curlRequest(["https://localhost:8000/path", "-k", "--http2"]),
);
assertEquals(
"hello world!",
await curlRequest([
"https://localhost:9000/path",
"https://localhost:8000/path",
"-k",
"--http2",
"--http2-prior-knowledge",
Expand Down
2 changes: 1 addition & 1 deletion ext/http/00_serve.js
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ function serve(arg1, arg2) {
};
const listenOpts = {
hostname: options.hostname ?? "0.0.0.0",
port: options.port ?? (wantsHttps ? 9000 : 8000),
port: options.port ?? 8000,
reusePort: options.reusePort ?? false,
};

Expand Down
Loading