|
1 | | -# Getting Started with Create React App |
| 1 | +# Welcome to React Router! |
2 | 2 |
|
3 | | -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). |
| 3 | +A modern, production-ready template for building full-stack React applications using React Router. |
4 | 4 |
|
5 | | -## Available Scripts |
| 5 | +[](https://stackblitz.com/github/remix-run/react-router-templates/tree/main/default) |
6 | 6 |
|
7 | | -In the project directory, you can run: |
| 7 | +## Features |
8 | 8 |
|
9 | | -### `npm start` |
| 9 | +- 🚀 Server-side rendering |
| 10 | +- ⚡️ Hot Module Replacement (HMR) |
| 11 | +- 📦 Asset bundling and optimization |
| 12 | +- 🔄 Data loading and mutations |
| 13 | +- 🔒 TypeScript by default |
| 14 | +- 🎉 TailwindCSS for styling |
| 15 | +- 📖 [React Router docs](https://reactrouter.com/) |
10 | 16 |
|
11 | | -Runs the app in the development mode.\ |
12 | | -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. |
| 17 | +## Getting Started |
13 | 18 |
|
14 | | -The page will reload if you make edits.\ |
15 | | -You will also see any lint errors in the console. |
| 19 | +### Installation |
16 | 20 |
|
17 | | -### `npm test` |
| 21 | +Install the dependencies: |
18 | 22 |
|
19 | | -Launches the test runner in the interactive watch mode.\ |
20 | | -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. |
| 23 | +```bash |
| 24 | +npm install |
| 25 | +``` |
21 | 26 |
|
22 | | -### `npm run build` |
| 27 | +### Development |
23 | 28 |
|
24 | | -Builds the app for production to the `build` folder.\ |
25 | | -It correctly bundles React in production mode and optimizes the build for the best performance. |
| 29 | +Start the development server with HMR: |
26 | 30 |
|
27 | | -The build is minified and the filenames include the hashes.\ |
28 | | -Your app is ready to be deployed! |
| 31 | +```bash |
| 32 | +npm run dev |
| 33 | +``` |
29 | 34 |
|
30 | | -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. |
| 35 | +Your application will be available at `http://localhost:5173`. |
31 | 36 |
|
32 | | -### `npm run eject` |
| 37 | +## Building for Production |
33 | 38 |
|
34 | | -**Note: this is a one-way operation. Once you `eject`, you can’t go back!** |
| 39 | +Create a production build: |
35 | 40 |
|
36 | | -If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. |
| 41 | +```bash |
| 42 | +npm run build |
| 43 | +``` |
37 | 44 |
|
38 | | -Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. |
| 45 | +## Deployment |
39 | 46 |
|
40 | | -You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. |
| 47 | +### Docker Deployment |
41 | 48 |
|
42 | | -## Learn More |
| 49 | +To build and run using Docker: |
43 | 50 |
|
44 | | -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). |
| 51 | +```bash |
| 52 | +docker build -t my-app . |
45 | 53 |
|
46 | | -To learn React, check out the [React documentation](https://reactjs.org/). |
| 54 | +# Run the container |
| 55 | +docker run -p 3000:3000 my-app |
| 56 | +``` |
| 57 | + |
| 58 | +The containerized application can be deployed to any platform that supports Docker, including: |
| 59 | + |
| 60 | +- AWS ECS |
| 61 | +- Google Cloud Run |
| 62 | +- Azure Container Apps |
| 63 | +- Digital Ocean App Platform |
| 64 | +- Fly.io |
| 65 | +- Railway |
| 66 | + |
| 67 | +### DIY Deployment |
| 68 | + |
| 69 | +If you're familiar with deploying Node applications, the built-in app server is production-ready. |
| 70 | + |
| 71 | +Make sure to deploy the output of `npm run build` |
| 72 | + |
| 73 | +``` |
| 74 | +├── package.json |
| 75 | +├── package-lock.json (or pnpm-lock.yaml, or bun.lockb) |
| 76 | +├── build/ |
| 77 | +│ ├── client/ # Static assets |
| 78 | +│ └── server/ # Server-side code |
| 79 | +``` |
| 80 | + |
| 81 | +## Styling |
| 82 | + |
| 83 | +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. |
| 84 | + |
| 85 | +--- |
| 86 | + |
| 87 | +Built with ❤️ using React Router. |
0 commit comments