Skip to content

Commit

Permalink
add redirects
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhinnery committed Sep 5, 2023
1 parent f8e3ad1 commit a39b586
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions static/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,35 @@ app.get(
(c) => c.redirect("/kv/manual/on_deploy"),
);

app.get(
"/runtime/manual/examples",
(c) => c.redirect("/runtime/tutorials"),
);

[
"chat_app",
"fetch_data",
"file_server",
"file_system_events",
"hashbang",
"hello_world",
"http_server",
"manage_dependencies",
"module_metadata",
"os_signals",
"read_write_files",
"subprocess",
"tcp_echo",
"tcp_server",
"unix_cat",
"word_finder",
].forEach((slug) => {
app.get(
`/runtime/manual/examples/${slug}`,
(c) => c.redirect(`/runtime/tutorials/${slug}`),
);
});

// Redirect all manual paths - most should work
app.all("/manual.*", (c) => {
const unversionedPath = c.req.path.split("/").slice(2);
Expand Down

0 comments on commit a39b586

Please sign in to comment.