diff options
author | 2023-02-24 17:48:49 -0800 | |
---|---|---|
committer | 2023-02-24 17:48:49 -0800 | |
commit | 0ecd773081c8254474b8c756887d19409aa13090 (patch) | |
tree | b277ae6f367e35fa83cbeec2ebac8034f1f9722c | |
parent | c72c2c2338f648544f1a35ba9100a9fe4ad46aee (diff) | |
download | bun-0ecd773081c8254474b8c756887d19409aa13090.tar.gz bun-0ecd773081c8254474b8c756887d19409aa13090.tar.zst bun-0ecd773081c8254474b8c756887d19409aa13090.zip |
Docs (#2170)
* Add hono and elysia
* Update elysia and add coming soon
* Fix typo
* Add back awesome
-rw-r--r-- | docs/ecosystem/elysia.md | 21 | ||||
-rw-r--r-- | docs/ecosystem/hono.md | 17 | ||||
-rw-r--r-- | docs/nav.ts | 16 |
3 files changed, 52 insertions, 2 deletions
diff --git a/docs/ecosystem/elysia.md b/docs/ecosystem/elysia.md new file mode 100644 index 000000000..d011e3f0c --- /dev/null +++ b/docs/ecosystem/elysia.md @@ -0,0 +1,21 @@ +[Elysia](https://elysiajs.com) is a Bun-first web framework that takes full advantage of Bun's HTTP, file system, and hot reloading APIs. + +```ts#server.ts +import { Elysia } from 'elysia' + +const app = new Elysia() + .get('/', () => 'Hello Elysia') + .listen(8080) + +console.log(`🦊 Elysia is running at on port ${app.server.port}...`) +``` + +Get started with `bun create`. + +```bash +$ bun create elysia ./myapp +$ cd myapp +$ bun run dev +``` + +Refer to the Elysia [documentation](https://elysiajs.com/quick-start.html) for more information.
\ No newline at end of file diff --git a/docs/ecosystem/hono.md b/docs/ecosystem/hono.md new file mode 100644 index 000000000..d63975e48 --- /dev/null +++ b/docs/ecosystem/hono.md @@ -0,0 +1,17 @@ +[Hono](https://github.com/honojs/hono) is a lightwaight ultrafast web framework designed for the edge. + +```ts +import { Hono } from 'hono' +const app = new Hono() + +app.get('/', (c) => c.text('Hono!')) + +export default app +``` + +Get started with `bun create` or follow Hono's [Bun quickstart](https://hono.dev/getting-started/bun). +```bash +$ bun create hono ./myapp +$ cd myapp +$ bun run start +``` diff --git a/docs/nav.ts b/docs/nav.ts index 3feebba66..4c05a4368 100644 --- a/docs/nav.ts +++ b/docs/nav.ts @@ -7,19 +7,23 @@ export type NavPage = { type: "page"; slug: string; title: string; + disabled?: boolean; + href?: string; }; type NavDivider = { type: "divider"; title: string; }; -function page(slug: string, title: string): NavPage { - return { type: "page", slug, title }; + +function page(slug: string, title: string, props?: {disabled?: boolean; href?: string}): NavPage { + return { type: "page", slug, title, ...props }; } function divider(title: string): NavDivider { return { type: "divider", title }; } + export default { items: [ divider("Intro"), @@ -34,6 +38,8 @@ export default { page("cli/test", "`bun test`"), page("cli/create", "`bun create`"), page("cli/bunx", "`bunx`"), + page("cli/deploy", "`bun deploy`", {disabled: true}), + // page("bundler", "Bundler"), // page("cli/bun-install", "`bun install`"), // page("cli/bun-create", "`bun create`"), @@ -51,6 +57,7 @@ export default { page("runtime/hot", "Hot reloading"), // page("runtime/loaders", "Loaders"), page("runtime/plugins", "Plugins"), + page("runtime/framework", "Framework API", {disabled: true}), // page("runtime/nodejs", "Node.js APIs"), divider("Ecosystem"), @@ -58,6 +65,11 @@ export default { page("ecosystem/typescript", "TypeScript"), page("ecosystem/react", "React"), page("ecosystem/express", "Express"), + page("ecosystem/hono", "Hono"), + page("ecosystem/elysia", "Elysia"), + page("ecosystem/awesome", "Awesome", { + href:"https://github.com/apvarun/awesome-bun" + }), divider("API"), page("api/http", "HTTP"), // "`Bun.serve`"), |