|
| 1 | +#Welcome to React Router! |
| 2 | + |
| 3 | +A modern, production-ready template for building full-stack React applications using React Router. |
| 4 | + |
| 5 | +##Features |
| 6 | + |
| 7 | +- 🚀 Server-side rendering |
| 8 | +- ⚡️ Hot Module Replacement (HMR) |
| 9 | +- 📦 Asset bundling and optimization |
| 10 | +- 🔄 Data loading and mutations |
| 11 | +- 🔒 TypeScript by default |
| 12 | +- 🎉 TailwindCSS for styling |
| 13 | +- 📖[React Router docs](https://reactrouter.com/) |
| 14 | + |
| 15 | +##Getting Started |
| 16 | + |
| 17 | +###Installation |
| 18 | + |
| 19 | +Install the dependencies: |
| 20 | + |
| 21 | +```bash |
| 22 | +npm install |
| 23 | +``` |
| 24 | + |
| 25 | +###Development |
| 26 | + |
| 27 | +Start the development server with HMR: |
| 28 | + |
| 29 | +```bash |
| 30 | +npm run dev |
| 31 | +``` |
| 32 | + |
| 33 | +Your application will be available at`http://localhost:5173`. |
| 34 | + |
| 35 | +##Building for Production |
| 36 | + |
| 37 | +Create a production build: |
| 38 | + |
| 39 | +```bash |
| 40 | +npm run build |
| 41 | +``` |
| 42 | + |
| 43 | +##Deployment |
| 44 | + |
| 45 | +###Docker Deployment |
| 46 | + |
| 47 | +To build and run using Docker: |
| 48 | + |
| 49 | +```bash |
| 50 | +docker build -t my-app. |
| 51 | + |
| 52 | +# Run the container |
| 53 | +docker run -p 3000:3000 my-app |
| 54 | +``` |
| 55 | + |
| 56 | +The containerized application can be deployed to any platform that supports Docker, including: |
| 57 | + |
| 58 | +- AWS ECS |
| 59 | +- Google Cloud Run |
| 60 | +- Azure Container Apps |
| 61 | +- Digital Ocean App Platform |
| 62 | +- Fly.io |
| 63 | +- Railway |
| 64 | + |
| 65 | +###DIY Deployment |
| 66 | + |
| 67 | +If you're familiar with deploying Node applications, the built-in app server is production-ready. |
| 68 | + |
| 69 | +Make sure to deploy the output of`npm run build` |
| 70 | + |
| 71 | +``` |
| 72 | +├── package.json |
| 73 | +├── package-lock.json (or pnpm-lock.yaml, or bun.lockb) |
| 74 | +├── server.js |
| 75 | +├── build/ |
| 76 | +│ ├── client/ # Static assets |
| 77 | +│ └── server/ # Server-side code |
| 78 | +``` |
| 79 | + |
| 80 | +##Styling |
| 81 | + |
| 82 | +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. |
| 83 | + |
| 84 | +--- |
| 85 | + |
| 86 | +Built with ❤️ using React Router. |