This workspace contains a couple of webapps that provides SSR and styled-components:
- Plain React + express app
- Next.js app
To get started, clone the repo and install dependencies.
git clone https://github.com/jaysoo/react-ssr-example.git react-ssr-example
cd react-ssr-example
yarn install
Then run the dev server:
yarn nx run server:serve-all
Run the prod build script:
yarn nx run server:build-all
Which will generate a compiled server module:
node dist/apps/server/main.js
To run the dev server:
yarn nx run next-app:serve
To generate a static site:
yarn nx run next-app:export
Then the static site will be at dist/apps/next-app/exported
.