diff --git a/src/cli/deps.ts b/src/cli/deps.ts index bba87cd4..1dcead72 100644 --- a/src/cli/deps.ts +++ b/src/cli/deps.ts @@ -3,12 +3,12 @@ export { join, resolve, toFileUrl, -} from "https://deno.land/std@0.102.0/path/mod.ts"; -export { walk } from "https://deno.land/std@0.102.0/fs/walk.ts"; -export { parse as parseArgs } from "https://deno.land/std@0.102.0/flags/mod.ts"; +} from "https://deno.land/std@0.128.0/path/mod.ts"; +export { walk } from "https://deno.land/std@0.128.0/fs/walk.ts"; +export { parse as parseArgs } from "https://deno.land/std@0.128.0/flags/mod.ts"; export { bold, green, red, yellow, -} from "https://deno.land/std@0.102.0/fmt/colors.ts"; +} from "https://deno.land/std@0.128.0/fmt/colors.ts"; diff --git a/src/server/deps.ts b/src/server/deps.ts index 6ce67efd..9d4cd926 100644 --- a/src/server/deps.ts +++ b/src/server/deps.ts @@ -6,9 +6,9 @@ export { extname, fromFileUrl, toFileUrl, -} from "https://deno.land/std@0.108.0/path/mod.ts"; -export { walk } from "https://deno.land/std@0.108.0/fs/walk.ts"; -export { listenAndServe } from "https://deno.land/std@0.108.0/http/server.ts"; +} from "https://deno.land/std@0.128.0/path/mod.ts"; +export { walk } from "https://deno.land/std@0.128.0/fs/walk.ts"; +export { serve } from "https://deno.land/std@0.128.0/http/server.ts"; // -- router -- export * as router from "https://crux.land/router@0.0.5"; diff --git a/src/server/mod.ts b/src/server/mod.ts index e0b0a85d..6b232a54 100644 --- a/src/server/mod.ts +++ b/src/server/mod.ts @@ -1,5 +1,5 @@ import { ServerContext } from "./context.ts"; -import { listenAndServe } from "./deps.ts"; +import { serve } from "./deps.ts"; import { AppModule, ErrorPageModule, @@ -32,5 +32,7 @@ export { ServerContext }; export async function start(routes: Manifest) { const ctx = await ServerContext.fromManifest(routes); console.log("Server listening on http://localhost:8000"); - await listenAndServe(":8000", ctx.handler()); + await serve(ctx.handler(), { + port: 8000, + }); }