Baiang / ReactSSR

server-side rendering(SSR) scheme based on Next.js+Koa React, continuous iteration
https://github.com/Baiang/ReactSSR
MIT License
80 stars 7 forks source link
ie9 koa2 nextjs node react ssr typescript

server-side rendering(SSR) scheme based on Next.js+Koa React

ReactSSR is based on Next.js+koa React's SSR server-side rendering solution, which is easy to use and works out of the box.

Background: In the use of react, there is no scaffolding tool like vue-cli, egg enterprise architecture and code specification; for novices, it is not suitable for immediate action.

Doc

Features

Quick Start

# git clone
> git clone git@github.com:Baiang/ReactSSR.git

# install
> npm install

# dev
> npm run dev

# Eslint code detection and prettier formatting code
> npm run eslint

# Automatic eslint code detection and prettier formatting code
> npm run lint:watch

# Unit test and coverage test
> npm run test

# build
> npm run build

# analyze:bundles
> npm run analyze:bundles

# Start the server
> npm run start

Eslint

You can use the Standard specification or you can choose Airbnb. Eslint offers two specifications:

Unit test

React unit test based on Jest + Enzyme

Editor syntax highlighting

Styled-jsx syntax highlighting method https://github.com/zeit/styled-jsx

TODOs