Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 1.42 KB

README.md

File metadata and controls

39 lines (22 loc) · 1.42 KB

React Sample Boilerplate for SSR and Hot Reloading

This boilerplate contains Server side rendering with hot reloading enabled Edit some text in src/components/Sample.js

Thanks to Glen Mailer for helping me out for setting up this.

I use Glen's webpack-hot-middleware which is a awesome middlewear for enabling hot reloading who use server side rendering

This boilerplate contains Server side rendering with hot reloading enabled

Edit some text in src/components/Sample.js
There are two routes SSR Page and Normal Page

- SSR : This Page is rendered from server using express and renderToString and markup is embedded in client. You can viewpage source of this page and check the markup

- Normal : This page is not having any SSR enabled. So it loads as normal reaact page. You compare the page source of this page and ssr page

Usage

npm install

npm run dev - for running dev server

npm start - for running production server

Open http://localhost:3001/ for opening the page.