forked from denoland/deno
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(serve): Support second parameter in deno serve (denoland#25606)
Closes denoland#24099
- Loading branch information
1 parent
018329a
commit 7477c2d
Showing
9 changed files
with
36 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Check [WILDCARD] | ||
deno serve: Listening on http://localhost:12345/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,4 @@ export default { | |
fetch(req) { | ||
return new Response("Hello world!"); | ||
}, | ||
}; | ||
} satisfies Deno.ServeDefaultExport; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
Check [WILDCARD] | ||
deno serve: Listening on http://0.0.0.0:12345/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"args": "serve --check --port 12468 main.ts", | ||
"output": "main.out", | ||
"tempDir": true, | ||
"exitCode": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Check [WILDCARD]main.ts | ||
deno serve: Listening on http://[WILDCARD] | ||
ServeHandlerInfo {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(async () => { | ||
for (let i = 0; i < 1000; i++) { | ||
try { | ||
const resp = await fetch("http://localhost:12468/"); | ||
Deno.exit(0); | ||
} catch { | ||
await new Promise((r) => setTimeout(r, 10)); | ||
} | ||
} | ||
|
||
Deno.exit(2); | ||
})(); | ||
|
||
export default { | ||
fetch(request, connInfo) { | ||
console.log(connInfo); | ||
return new Response("Hello world!"); | ||
}, | ||
} satisfies Deno.ServeDefaultExport; |