* Add hono and elysia

* Update elysia and add coming soon

* Fix typo

* Add back awesome
This commit is contained in:
Colin McDonnell
2023-02-24 17:48:49 -08:00
committed by GitHub
parent c72c2c2338
commit 0ecd773081
3 changed files with 52 additions and 2 deletions

21
docs/ecosystem/elysia.md Normal file
View File

@@ -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.

17
docs/ecosystem/hono.md Normal file
View File

@@ -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
```

View File

@@ -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`"),