summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Rosell <me@carlrosell.com>2020-01-24 16:35:23 +0100
committerRyan Dahl <ry@tinyclouds.org>2020-01-24 10:35:23 -0500
commit11a29fdb44f5c07f4bc7aa49a136b695ee17f0c3 (patch)
treed9292fc47c560a2b547766907c39fcd3a2376844
parentbc89f04cbf5e7a8480331eea77e57a100c8179d7 (diff)
fix(std/http): update listenAndServe argument type (#3775)
allow same argument type for `listenAndServe` as `serve`. fixes: #3774
-rw-r--r--std/http/server.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/http/server.ts b/std/http/server.ts
index 9884cd845..bd66e9f90 100644
--- a/std/http/server.ts
+++ b/std/http/server.ts
@@ -494,7 +494,7 @@ export function serve(addr: string | ServerConfig): Server {
}
export async function listenAndServe(
- addr: string,
+ addr: string | ServerConfig,
handler: (req: ServerRequest) => void
): Promise<void> {
const server = serve(addr);