This content originally appeared on DEV Community and was authored by ramoures
React JS Server Side Rendering template (shopping website) by Express JS and Vite.
- Data fetching from Restful API
- Sitemap addon
- SEO friendly
Installation
git clone https://github.com/ramoures/express-react-ssr/
cd express-react-ssr
npm install
npm run build
-
npm start
ornode server.js
- Browse
http://localhost:5173/shop/
Update the
.env
file to edit/remove the shop directory from the URL.
Develope
- Tailwind CLI build and minify process:
npm run tw
npm run dev
Browse http://localhost:4173/shop/
Always ready fresh template in development.
Build
After development completion:
-
npm run build
for build new dist directory. -
npm start
ornode server.js
- Browse
http://localhost:5173/shop/
I Used
- Axios
- React Router Dom
- React Helmet
- Tailwind CSS framework
- dotenv
- XML Sitemap
- ...
Data source: fakestoreapi.com
With the help of : template-ssr-react
License Under The MIT License
Email: ramoures@gmail.com
This content originally appeared on DEV Community and was authored by ramoures
ramoures | Sciencx (2024-07-30T04:08:22+00:00) React SSR template with express. Retrieved from https://www.scien.cx/2024/07/30/react-ssr-template-with-express/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.