A minimal React Router project with bknd & Cloudflare integration. Note that adding the bknd routes for the API and Admin are optional. Those could also be served from app/worker.ts directly.
This project uses Vite's Environment API, therefore bknd types generation does not work (yet).
Inside of your React Router project, you'll see the following folders and files:
/
├── public/
├── app/
│ ├── root.tsx
│ └── routes/
│ ├── _index.tsx
│ ├── admin.$.tsx
│ └── api.$.tsx
└── package.json
To update bknd config, check bknd.config.ts.
All commands are run from the root of the project, from a terminal:
| Command | Action |
|---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:5173 |
npm run build |
Build your production site |
Feel free to check our documentation or jump into our Discord server.