Skip to content

Commit

Permalink
update deno to use built in http server
Browse files Browse the repository at this point in the history
  • Loading branch information
wangbinyq committed Apr 8, 2024
1 parent 6edd562 commit 6bb6d76
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions templates/classic-remix-compiler/deno/server.ts
@@ -1,13 +1,11 @@
import { createRequestHandlerWithStaticFiles } from "@remix-run/deno";
// Import path interpreted by the Remix compiler
import * as build from "@remix-run/dev/server-build";
import { serve } from "https://deno.land/std@0.128.0/http/server.ts";

const remixHandler = createRequestHandlerWithStaticFiles({
build,
getLoadContext: () => ({}),
});

const port = Number(Deno.env.get("PORT")) || 8000;
console.log(`Listening on http://localhost:${port}`);
serve(remixHandler, { port });
Deno.serve({ port }, remixHandler);

0 comments on commit 6bb6d76

Please sign in to comment.