This template has been tested with Deno v2.2.1+. Live deployment here hosted on Deno Deploy.
Run the following command:
deno init --npm react-router --no-install --template redabacha/react-router-deno-template
And then run deno install
in the created directory.
Thanks to the @deno/vite-plugin,
it's possible to use packages from JSR and imports from HTTPS URLs (via the
deno.json imports
field)
within the app/
directory which will get included in the server and/or browser
bundles as needed.
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
- 🎉 TailwindCSS for styling
- 📖 React Router docs
Install the dependencies:
deno install
Start the development server with HMR:
deno task dev
Your application will be available at http://localhost:5173
.
Create a production build:
deno task build
Deployment can be done using the deployctl CLI:
deployctl deploy --entrypoint ./server.production.ts
To build and run using Docker:
docker build -t my-app .
# Run the container
docker run --init -p 8000:8000 my-app
The containerized application can be deployed to any platform that supports Docker, including:
- AWS ECS
- Google Cloud Run
- Azure Container Apps
- Digital Ocean App Platform
- Fly.io
- Railway
If you're familiar with deploying Deno applications, the built-in app server is production-ready.
Make sure to deploy the output of deno task build
├── package.json
├── deno.json
├── deno.lock
├── build/
│ ├── client/ # Static assets
│ └── server/ # Server-side code
├── server.production.ts # Entrypoint
This template comes with Tailwind CSS already configured for a simple default starting experience. You can use whatever CSS framework you prefer.
Built with ❤️ using React Router.