From c569d958aaf49db70856a60d75954c83ab8bd95a Mon Sep 17 00:00:00 2001 From: Ali Hasani Date: Thu, 30 Apr 2020 15:17:53 +0430 Subject: fix(std): use fromFileUrl (#5005) --- std/examples/chat/server.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'std/examples/chat/server.ts') diff --git a/std/examples/chat/server.ts b/std/examples/chat/server.ts index 40affbd5f..a86ed737a 100644 --- a/std/examples/chat/server.ts +++ b/std/examples/chat/server.ts @@ -5,6 +5,7 @@ import { WebSocket, isWebSocketCloseEvent, } from "../../ws/mod.ts"; +import { fromFileUrl } from "../../path/mod.ts"; const clients = new Map(); let clientId = 0; @@ -47,7 +48,7 @@ listenAndServe({ port: 8080 }, async (req) => { }); } else { // server launched by deno run ./server.ts - const file = await Deno.open(u.pathname); + const file = await Deno.open(fromFileUrl(u)); req.respond({ status: 200, headers: new Headers({ -- cgit v1.2.3