This is a React application that has implemented React 18's server-side API for rendering components on the server. This allows for improved performance and better user experience by pre-rendering components on the server and sending them to the client.
To get started with this project, follow the steps below:
TODO remove create-react-app it require index.html for no reason TODO get it to run the client side js code... it's not the main.js, but generated by react-scripts
- Node.js (version 12 or higher)
- npm (Node Package Manager)
- Open your terminal.
- Change the current working directory to the location where you want to clone the project.
- Run the following command to clone the repository:
- Navigate to the project's root directory in the terminal.
- Run the following command to install the required dependencies:
npm install
Before starting the project, it's recommended to build the application to ensure you have the latest changes. To build the project, run the following command:
npm run build
To start the React application with server-side rendering (SSR), run the following command:
npm run ssr
This will launch the application on a local development server. Open your web browser and visit http://localhost:3002
to see the application in action.