Document of RSSR (React Server Side Rendering) boilerplate.
RSSR is React Server Side Rendering biolerplate that helps you creat SSR React apps easier than any time.
RSSR is a SSR boilerplate for React js which contains:
- SSR (Server Side Rendering)
- User Authentication Structure
- SEO optimization utilities
- SCSS Style Namespace
- and more …
- Run commands at root of project.
- Make sure that you have Node.js v10.13.0 and npm v6 or above installed.
- Clone repo using
git clone https://github.com/rssr-org/RSSR.git <YOUR_PROJECT_NAME> - Move to your local directory:
cd <YOUR_PROJECT_NAME> - Select one of the following instructions based on your environment
- Run
npm i(install npm packages). - Run
npm run devin other next terminal (start running project in development mode). - Stay for initial build to be able to see App over
localhost:8000(App will be opened in browser automatically).
In the real project you must remove fakeApi.
- Go to
~/provider/server/development.js, findrequire('../setup/fakeApi')(app)and remove it. - Go to
~/provider/setupand removefakeApi.jsfile. - Change
API_HOST_IN_CLIENTandAPI_HOST_IN_SERVERin.envfile.
- Pull changes from Git.
- Run
npm i(install npm packages). - Run
npm run build(building the project and inject it in to/distdirectory at root of project). - Run one of the following commands.
npm run startfor starting the project bynodejsrunner (recommended for testing production).npm run start-pm2-lowfor starting the project by pm2 tools and run production server over one core of CPU.npm run start-pm2is likenpm run start-pm2-lowbut it runs over all CPU core. (learn more about it in PM2 cluster) (recommended for main production)
npm run up-low, mix of delete available process andnpm run start-pm2-low(once CPU core)npm run up,likenpm run up-lowbut over all CPU core (recommended for main production)