mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 10:58:56 +00:00
* Idea: Buchta Docs Page * Tweaks --------- Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
803 B
803 B
Buchta is a fullstack framework designed to take full advantage of Bun's strengths. It currently supports Preact and Svelte.
To get started:
$ 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:
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.