A modern, production-ready template for building full-stack React applications using React Router.
- ๐ Server-side rendering
- โก๏ธ Hot Module Replacement (HMR)
- ๐ฆ Asset bundling and optimization
- ๐ Data loading and mutations
- ๐ TypeScript by default
- ๐ React Router docs
Install the dependencies:
npm installRun an initial database migration:
npm run db:migrateStart the development server with HMR:
npm run devYour application will be available at http://localhost:5173.
Create a production build:
bun run buildDeployment is done using the Wrangler CLI.
First, you need to create a d1 database in Cloudflare.
bun wrangler d1 create <name-of-your-database>Be sure to update the wrangler.toml file with the correct database name and id.
You will also need to update the drizzle.config.ts file, and then run the production migration:
bun run db:migrate-productionTo build and deploy directly to production:
bun run deployTo deploy a preview URL:
bun wrangler versions uploadYou can then promote a version to production after verification or roll it out progressively.
bun wrangler versions deployBuilt with โค๏ธ using React Router.