awinogradov / cra-ssr-boilerplate

Create React App by Facebook with stream SSR, HMR, TypeScript and live rebuilding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Create React App (improved)

Greenkeeper badge

What's inside?

Usage

❯ git clone git@github.com:awinogradov/cra-ssr-boilerplate.git react-ssr
❯ cd react-ssr
❯ npm i
❯ npm start

Point your browser to http://localhost:3000/.

How it works

react-scripts uses webpack-dev-server for incremental building and HMR, it works fine and the only one way to use it with SSR it's proxy. webpack-dev-server compiles all static files, but Express renders html on the different port. It's the reason why we need to use the proxy for static files and ws to webpack-dev-server from Express.

Building

❯ npm run build

Production

❯ npm run start:production

Point your browser to http://localhost:3000/.

License MIT

About

Create React App by Facebook with stream SSR, HMR, TypeScript and live rebuilding

License:MIT License


Languages

Language:TypeScript 67.4%Language:JavaScript 27.6%Language:CSS 3.6%Language:Dockerfile 1.4%