A simplified example of static site generation (SSG) with conditional server side rendering (SSR) using React, Webpack, and Express.
Download this repo and install dependencies. You will also need Node on your machine.
git clone https://github.com/noahismith/react-ssr-ssg.git
cd react-ssr-ssg
npm installTo test SSR start the server without generating the html then open http://localhost:3000 in your browser.
npm run startTo test conditional SSR generate the html and start the server. Remeber to clear the dist/ folder to test SSR only.
npm run generate
npm run start