Getting Started
Create a New Project
Section titled “Create a New Project”Scaffold a new project with the init command:
npx @farbenmeer/bunny init my-appThis creates the directory, extracts the boilerplate, and installs dependencies. You can specify a package manager with --use:
npx @farbenmeer/bunny init my-app --use pnpmIf you omit the name, the project is initialized in the current directory (which must not already contain a package.json).
Development
Section titled “Development”Start the development server:
bunny devThis starts a Vite dev server for the frontend and watches your API code with esbuild for hot-reload. The server listens on port 3000 by default:
bunny dev --port 8080During development, the service worker is replaced with a dummy that immediately unregisters itself so caching does not interfere with hot-reload.
Production Build
Section titled “Production Build”Build for production:
bunny buildThis produces a .bunny/prod/ directory containing:
dist/— The Vite-built SPA and static assets.api.cjs— The bundled API server.dist/sw.js— The service worker with the build manifest baked in.buildId.txt— A unique build identifier.
Standalone Mode
Section titled “Standalone Mode”Use --standalone to bundle all dependencies (including node_modules) into a single server.cjs:
bunny build --standaloneThis is useful for Docker deployments where you want a minimal image without node_modules but might now work if your dependencies include ffi binaries.
Source Maps
Section titled “Source Maps”Generate source maps with --sourcemap:
bunny build --sourcemapProduction Server
Section titled “Production Server”Start the production server:
bunny startThis serves the built API and static files. Set the port with --port:
bunny start --port 8080