aboutsummaryrefslogtreecommitdiff
path: root/docs/ecosystem/buchta.md
blob: d0e8b92d895b1caf2e39f5468dc1f44ab1b8b739 (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
[Buchta](https://buchtajs.com) is a fullstack framework designed to take full advantage of Bun's strengths. It currently supports Preact and Svelte.

To get started:

```bash
$ bunx buchta init myapp
Project templates: 
- svelte
- default
- preact
Name of template: preact  
Do you want TSX? y  
Do you want SSR? y
Enable livereload? y
Buchta Preact project was setup successfully!
$ cd myapp
$ bun install
$ bunx buchta serve
```

To implement a simple HTTP server with Buchta:

```ts#server.ts
import { Buchta, type BuchtaRequest, type BuchtaResponse } from "buchta";

const app = new Buchta();

app.get("/api/hello/", (req: BuchtaRequest, res: BuchtaResponse) => {
  res.send("Hello, World!");
});

app.run();
```


For more information, refer to Buchta's [documentation](https://buchtajs.com/docs/).