A monorepo containing a React frontend and Go backend.
napkin/
├── napkin-app/ # Vite + React + TypeScript frontend
├── napkin-backend/ # Go backend
├── package.json # Root package.json
└── pnpm-workspace.yaml
- Node.js >= 18
- pnpm >= 8
- Go >= 1.25
pnpm installRun both frontend and backend with a single command: reat
pnpm dev- Frontend:
http://localhost:5173(with API proxy to backend) - Backend:
http://localhost:8080
In development, the Vite dev server proxies /api/* and /health requests to the Go backend, so you only need to access http://localhost:5173.
pnpm dev:frontend # Frontend only
pnpm dev:backend # Backend onlyBuild both frontend and backend:
pnpm buildThis builds the React app to napkin-app/dist/ and compiles the Go binary to napkin-backend/bin/server.
Start the production server:
pnpm startThe Go server serves both the API and static frontend files on http://localhost:8080.
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check |
/api/hello |
GET | Hello world example |