Skip to content

daixianceng/react-universal-example

Repository files navigation

react-universal-example

react-universal-example

This is an universal example app for React, Based on react-starter-kit

中文文档

Here is a demo

Compared to react-starter-kit, this application provides the following features:

  • Google Material Design
  • Jss(Css in Js) themes
  • Write PostCss using Sass syntax (precss)
  • Supports relative path (APP_BASE_URL)
  • Better webpack configuration
  • Removed unused dependencies

Quick Start

git clone https://github.com/daixianceng/react-universal-example.git
cd react-universal-example

# Copy default configuration
cp .env.example .env

# Install dependencies
npm install
# or
yarn

# Run application in development
npm start
# or
yarn start

Now you can open localhost:3000 in your borwser. The project depends on the API of yii2-app-example. This is a clean and beautiful RESTful API, you will love it. The project has a default API to https://demo.zhaidongxi.com/yii2-app-example-api, so you do not need to install yii2-app-example.

Compile the project:

npm run build -- --release
# or
yarn build -- --release

Run:

npm run serve
# or
yarn serve

# Or use pm2 to start the daemon (install pm2 first: npm i pm2 -g)
npm run pm2-serve
# or
yarn pm2-serve

More documentation please move getting started guide

License

react-universal-example is released under the FSB License. See the bundled LICENSE for details.