Skip to content

Commit

Permalink
test on preview deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhinnery committed Sep 3, 2023
1 parent 2df7b08 commit 4cce4af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
6 changes: 5 additions & 1 deletion sidebars/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,11 @@ const sidebars = {
value: "<div>Connect to databases</div>",
className: "section-header",
},
"manual/kv",
{
type: "link",
href: "/kv/manual/on_deploy",
label: "Deno KV",
},
"manual/dynamodb",
"manual/faunadb",
"manual/firebase",
Expand Down
6 changes: 4 additions & 2 deletions static/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ app.all("/deploy/docs.*", (c) => {
app.use("*", serveStatic({ root: "./" }));

// 404s
app.notFound((c) => {
app.notFound(async (c) => {
console.error("404 error returned for path: ", c.req.path);
return c.redirect("/404.html", 404);
const f = await Deno.readTextFile("./404.html");
console.log(f);
return c.html(f);
});

// Serve on port 8000
Expand Down

0 comments on commit 4cce4af

Please sign in to comment.