https://github.com/exectx/react-router-cloudflare-template
This is just on of the official cloudflare templates + tailwind v4
https://github.com/exectx/react-router-cloudflare-template
Last synced: about 1 month ago
JSON representation
This is just on of the official cloudflare templates + tailwind v4
- Host: GitHub
- URL: https://github.com/exectx/react-router-cloudflare-template
- Owner: exectx
- Created: 2025-02-21T08:23:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-21T08:30:47.000Z (over 1 year ago)
- Last Synced: 2025-02-21T09:31:25.163Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Welcome to React Router + Cloudflare Workers!
> [!NOTE]
> This is a modifed [template](https://github.com/cloudflare/templates/tree/main/react-router-starter-template) from cloudflare + tailwind v4

A modern, production-ready template for building full-stack React applications using React Router.
## Features
- 🚀 Server-side rendering
- ⚡️ Hot Module Replacement (HMR)
- 📦 Asset bundling and optimization
- 🔄 Data loading and mutations
- 🔒 TypeScript by default
- 🎉 TailwindCSS for styling
- 📖 [React Router docs](https://reactrouter.com/)
## Getting Started
Outside of this repo, you can start a new project with this template using [C3](https://developers.cloudflare.com/pages/get-started/c3/) (the `create-cloudflare` CLI):
```bash
npm create cloudflare@latest -- --template=exectx/react-router-cloudflare-template
```
A live public deployment of this template is available at [https://react-router-starter-template.templates.workers.dev](https://react-router-starter-template.templates.workers.dev)
### Installation
Install the dependencies:
```bash
npm install
```
### Development
Start the development server with HMR:
```bash
npm run dev
```
Your application will be available at `http://localhost:5173`.
## Typegen
Generate types for your Cloudflare bindings in `wrangler.toml`:
```sh
npm run typegen
```
## Building for Production
Create a production build:
```bash
npm run build
```
## Deployment
If you don't have a Cloudflare account, [create one here](https://dash.cloudflare.com/sign-up)! Go to your [Workers dashboard](https://dash.cloudflare.com/?to=%2F%3Aaccount%2Fworkers-and-pages) to see your [free custom Cloudflare Workers subdomain](https://developers.cloudflare.com/workers/configuration/routing/workers-dev/) on `*.workers.dev`.
Once that's done, you can deploy your app:
```sh
npm run deploy
```
## Styling
This template comes with [Tailwind CSS](https://tailwindcss.com/) already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
---
Built with ❤️ using React Router.