Files
bun.sh/docs/ecosystem/buchta.md
Ján Gajdoš 15f23d70d6 docs: Buchta Docs Page (#2378)
* Idea: Buchta Docs Page

* Tweaks

---------

Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
2023-03-20 21:32:20 -07:00

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.