https://github.com/redabacha/react-router-deno-template
React Router v7 + Deno v2
https://github.com/redabacha/react-router-deno-template
Last synced: 4 months ago
JSON representation
React Router v7 + Deno v2
- Host: GitHub
- URL: https://github.com/redabacha/react-router-deno-template
- Owner: redabacha
- Created: 2024-04-05T23:25:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-24T14:53:42.000Z (8 months ago)
- Last Synced: 2025-02-24T15:45:37.346Z (8 months ago)
- Language: TypeScript
- Homepage:
- Size: 286 KB
- Stars: 52
- Watchers: 2
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - redabacha/react-router-deno-template - React Router v7 + Deno v2 (TypeScript)
README
# NOTES
This template has been tested with Deno v2.2.1+.
[Live deployment here](https://huge-badger-89.deno.dev/) hosted on
[Deno Deploy](https://deno.com/deploy).
## Using this template
Run the following command:
```zsh
deno init --npm react-router --no-install --template redabacha/react-router-deno-template
```
And then run `deno install` in the created directory.
## Using JSR and HTTPS imports in `app/`
Thanks to the [@deno/vite-plugin](https://github.com/denoland/deno-vite-plugin),
it's possible to use packages from JSR and imports from HTTPS URLs (via the
[deno.json `imports` field](https://docs.deno.com/runtime/fundamentals/modules/#managing-third-party-modules-and-libraries))
within the `app/` directory which will get included in the server and/or browser
bundles as needed.
# Welcome to React Router!
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
### Installation
Install the dependencies:
```bash
deno install
```
### Development
Start the development server with HMR:
```bash
deno task dev
```
Your application will be available at `http://localhost:5173`.
## Building for Production
Create a production build:
```bash
deno task build
```
## Deployment
### Deno Deploy
Deployment can be done using the
[deployctl](https://github.com/denoland/deployctl) CLI:
```bash
deployctl deploy --entrypoint ./server.production.ts
```
### Docker Deployment
To build and run using Docker:
```bash
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
### DIY Deployment
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
```
## 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.