UPDATE README.md

pull/19/head
Bosn 7 years ago
parent 7f9442cd0a
commit f843ad3aee

@ -4,41 +4,57 @@
RAP2 is a new project based on [RAP1](https://github.com/thx/RAP). It has two components:
RAP2是在RAP1基础上重做的新项目它包含两个组件(对应两个Github Repository)。
* 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)
* rap2-delos: 后端数据API服务器基于Koa + MySQL[link](http://github.com/thx/rap2-delos)
* rap2-dolores: 前端静态资源基于React [link](http://github.com/thx/rap2-dolores)
### Resources
* [Official Site: rap2.taobao.org](http://rap2.taobao.org)
* DingDing Group ID: 11789704
* [Official Site 官网: rap2.taobao.org](http://rap2.taobao.org)
* DingDing Group ID 钉钉群: 11789704
## Deployment
## Deployment 部署
### development
### development 开发模式
```sh
# create database
# create database 先创建数据库
mysql -e 'CREATE DATABASE IF NOT EXISTS RAP2_DELOS_APP DEFAULT CHARSET utf8 COLLATE utf8_general_ci'
# initialize database
# initialize 初始化
npm install
# confirm configurations in /config/config.dev.js (used in development mode)
# 确认/config/config.dev.js中的配置(.dev.js后缀表示用于开发模式)
# initialize database 初始化数据库
npm run create-db
# execute mocha test cases & js code check
# 执行mocha测试用例和js代码规范检查
npm run check
# start server in development mode
# start server in development mode, watch & restart automatically
# 启动开发模式的服务器 监视并在发生代码变更时自动重启
npm run dev
```
### production
### production 生产模式
```sh
# start server in production mode
# 1. change server config in /config/config.prod.js
# 1. 修改/config/config.prod.js中的服务器配置
# 2. start server in production mode
# 2. 启动生产模式服务器
npm start
```

Loading…
Cancel
Save