You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rap2-dolores/README.md

79 lines
2.3 KiB
Markdown

7 years ago
# RAP2-DOLORES CE version (front-end static build)
7 years ago
7 years ago
[![Build Status](https://travis-ci.org/thx/rap2-dolores.svg?branch=master)](https://travis-ci.org/thx/rap2-dolores)
7 years ago
4 years ago
### Intro
7 years ago
7 years ago
RAP2 is a new project based on [RAP1](https://github.com/thx/RAP). It has two components:
7 years ago
RAP2是在RAP1基础上重做的新项目它包含两个组件(对应两个Github Repository)。
7 years ago
7 years ago
* rap2-delos: back-end data API server based on Koa + MySQL [link](http://github.com/thx/rap2-delos)
* rap2-dolores: front-end static build based on React [link](http://github.com/thx/rap2-dolores)
7 years ago
7 years ago
* rap2-delos: 后端数据API服务器基于Koa + MySQL[link](http://github.com/thx/rap2-delos)
* rap2-dolores: 前端静态资源基于React [link](http://github.com/thx/rap2-dolores)
7 years ago
### Resources
7 years ago
* [Official Site 官网: rap2.taobao.org](http://rap2.taobao.org)
* DingDing Group ID 钉钉群: 31626736 (二群,一群已满)
7 years ago
7 years ago
## Deployment 部署
7 years ago
7 years ago
### development 开发模式
7 years ago
```sh
7 years ago
# initialize 初始化
7 years ago
npm install
7 years ago
# config development mode server API path in /src/config/config.dev.js
7 years ago
# 配置开发模式后端服务器的地址。 /src/config/config.dev.js
7 years ago
# test cases 测试用例
7 years ago
npm run test
7 years ago
# will watch & serve automatically 会自动监视改变后重新编译
7 years ago
npm run dev
7 years ago
7 years ago
```
7 years ago
### production
```sh
7 years ago
# 1. config server API path in /src/config/config.prod.js(production config file)
7 years ago
# 1. 配置后端服务器的地址。 /src/config/config.prod.js(生产模式配置文件)
7 years ago
7 years ago
# 2. produce react production package
7 years ago
# 2. 编译React生产包
7 years ago
npm run build
7 years ago
# 3. use serve or nginx to serve the static build directory
7 years ago
# 3. 用serve命令或nginx服务器路由到编译产出的build文件夹作为静态服务器即可
7 years ago
serve -s ./build -p 80
```
## Author
* Owner: Alimama FE Team
* Author:
* Before v2.3: all by [@Nuysoft](https://github.com/nuysoft/), creator of [mockjs](mockjs.com).
* v2.4+ / CE version: [Bosn](http://github.com/bosn/)(creator of [RAP1](https://github.com/thx/RAP)) [Nuysoft](https://github.com/nuysoft/)
* We are looking for more and more contributors :)
### Tech Arch
* Front-end (rap2-dolores)
* React / Redux / Saga / Router
* Mock.js
* SASS / Bootstrap 4 beta
* server: nginx
* Back-end (rap2-delos)
* Koa
* Sequelize
* MySQL
* Server
* server: node