aboutsummaryrefslogtreecommitdiff
path: root/docs/guides/ecosystem/hono.md
blob: 6d928a655db2557c1b83b7d77c05ef87b11df26b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
---
name: Build an HTTP server using Hono and Bun
---

[Hono](https://github.com/honojs/hono) is a lightweight 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;
```

---

Use `create-hono` to get started with one of Hono's project templates. Select `bun` when prompted for a template.

```bash
$ bunx create-hono myapp
✔ Which template do you want to use? › bun
cloned honojs/starter#main to /path/to/myapp
✔ Copied project files
$ cd myapp
$ bun install
```

---

Then start the dev server and visit [localhost:3000](http://localhost:3000).

```bash
$ bun run dev
```

---

Refer to Hono's guide on [getting started with Bun](https://hono.dev/getting-started/bun) for more information.
arred Sumner 2-8/+46 2022-06-22Update Dockerfile.baseGravatar Jarred Sumner 1-1/+1 2022-06-22Update WebKitGravatar Jarred Sumner 1-0/+0 2022-06-22cleanup websocket testGravatar Jarred Sumner 1-3/+6 2022-06-22Fix `WebSocket` when HTTP server is not runningGravatar Jarred Sumner 14-38/+103 2022-06-22Update build-idGravatar Jarred Sumner 1-1/+1 2022-06-22cleanupGravatar Jarred Sumner 6-719/+3 2022-06-22Update index.d.tsGravatar Jarred Sumner 1-0/+1 2022-06-22types for `bun:jsc`Gravatar Jarred Sumner 2-1/+37 2022-06-22Slightly customize the `events` polyfill so it uses ESMGravatar Jarred Sumner 1-1/+522 2022-06-22Fix memory bugs in escapeHTML & arrayBufferToStringGravatar Jarred Sumner 1-65/+61