-
-
-
-
- oak is a middleware framework for handling HTTP requests across{" "}
-
- Deno
- ,{" "}
-
- Node.js
- ,{" "}
- Bun
- {" "}
- and{" "}
+ <>
+
+
{title}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{
+ ctx.response.body = "Hello world";
+});
+
+const app = new Application();
+app.use(router.routes());
+app.use(router.allowedMethods());
+
+app.listen();
+`}
+ />
+
+
+
+ oak was inspired by Express.js and koa and originally written for
+ the Deno runtime. This makes it easy to adapt existing approaches
+ with out of the box cross platform support.
+
- Cloudflare Workers
- .
-
-
+ See the docs
+
+
+
+
+
-
+
+ >
);
}
diff --git a/static/oak-social.png b/static/oak-social.png
new file mode 100644
index 0000000..c0cd5e2
Binary files /dev/null and b/static/oak-social.png differ
diff --git a/static/styles.css b/static/styles.css
index 4d8d4eb..d3d2271 100644
--- a/static/styles.css
+++ b/static/styles.css
@@ -27,3 +27,56 @@
#pm-bun:checked ~ nav label[for='pm-bun'] {
@apply bg-primary-100 dark:bg-primary-900;
}
+
+
+.highlight .token {
+ @apply text-darkBlue-600 dark:text-darkBlue-400;
+}
+
+.highlight .token.attr-name {
+ @apply text-blue-500;
+}
+
+.highlight .token.class-name {
+ @apply text-blue-600 dark:text-blue-400;
+}
+
+.highlight .token.comment {
+ @apply text-darkBlue-600 dark:text-darkBlue-400;
+}
+
+.highlight .token.function {
+ @apply text-orange-600 dark:text-orange-400;
+}
+
+.highlight .token.keyword {
+ @apply text-darkPurple-700 dark:text-darkPurple-500;
+}
+
+.highlight .token.number {
+ @apply text-purple-600 dark:text-purple-400;
+}
+
+.highlight .token.operator {
+ @apply text-yellow-800 dark:text-yellow-500;
+}
+
+.highlight .token.punctuation {
+ @apply text-white;
+}
+
+.highlight .token.regex .token {
+ @apply text-orange-600 dark:text-orange-400;
+}
+
+.highlight .token.regex .token.regex-delimiter {
+ @apply text-red-900 dark:text-red-600;
+}
+
+.highlight .token.string {
+ @apply text-darkOrange-700 dark:text-darkOrange-400;
+}
+
+.highlight .token.tag {
+ @apply text-yellow-800 dark:text-yellow-500;
+}