From 8d5f26886be68f4b1d630cbbf6c1812735d1ba5d Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Wed, 3 Jul 2024 14:39:05 -0400 Subject: [PATCH] again --- .github/workflows/deploy.yml | 2 +- server.ts | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 server.ts diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index c6f8798c0..72ee43d0b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -40,4 +40,4 @@ jobs: uses: denoland/deployctl@v1 with: project: "deno-docs" - entrypoint: "_site/server.ts" + entrypoint: "server.ts" diff --git a/server.ts b/server.ts new file mode 100644 index 000000000..f2e7d3e37 --- /dev/null +++ b/server.ts @@ -0,0 +1,19 @@ +import Server from "lume/core/server.ts"; +import redirects from "lume/middlewares/redirects.ts"; +import REDIRECTS from "./_site/_redirects.json" with { type: "json" }; + +const server = new Server({ + port: 8000, + root: "_site", +}); + +server.use(redirects({ + redirects: { + ...REDIRECTS, + "/api/": "/api/deno/", + }, +})); + +server.start(); + +console.log("Listening on http://localhost:8000");