Installation
Create a new RiserBob project, or add the framework to an existing Bun project.
Create a new project
The quickest way to start is the project template. It gives you a working server, a ready-made users module and the recommended folder structure.
Terminal
bun create riser-bob my-appcd my-appbun installbun run devThe server runs on port 4000. Visit http://localhost:4000 to see Welcome to Bikini Bottom! 🍍.
Add to an existing project
Terminal
bun add riser-bobScripts
The starter project comes with three scripts.
| Script | Command | What it does |
|---|---|---|
bun run dev | bun run --watch src/index.ts | Runs the server and restarts it on every change. |
bun run start | bun run src/index.ts | Runs the server once. |
bun run build | bun build src/index.ts --outdir dist --minify | Bundles the app into dist/. |
Environment variables
Bun loads a .env file from the project root automatically, so you can read values with process.env. The starter does not need any. The Build a project guide shows the variables a real app usually adds.