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.
 
 
 
 
 
Go to file
Bosn c0859f73a4 fix module cache bug 7 years ago
.vscode fix #58 add TypeScript to delos! 7 years ago
database fix build 7 years ago
public fix #58 add TypeScript to delos! 7 years ago
src fix module cache bug 7 years ago
test fix bugs 7 years ago
.gitignore add redis server for cache and session storage, add cache for getting repository, optimize some queries 7 years ago
.jshintrc first submit 7 years ago
.travis.yml fix travis 7 years ago
README.md dev 7 years ago
package.json add importer 7 years ago
tsconfig.json fix many to many mapping errors, reconstruct BO layer 7 years ago
tslint.json newly merged from master 7 years ago

README.md

RAP2-DELOS CE version (back-end data API server)

Build Status

RAP2 is a new project based on RAP1. It has two components: RAP2是在RAP1基础上重做的新项目它包含两个组件(对应两个Github Repository)。

  • rap2-delos: back-end data API server based on Koa + MySQL link

  • rap2-dolores: front-end static build based on React link

  • rap2-delos: 后端数据API服务器基于Koa + MySQLlink

  • rap2-dolores: 前端静态资源基于React link

Resources

Deployment 部署

enviaronment requirements 环境要求

  • Node.js 8.9.4+
  • MySQL 5.7+
  • Redis 4.0+

development 开发模式


# install mysql and redis server 安装MySQL和Redis服务器
请自行查找搭建方法mysql/redis配置在config.*.ts文件中在不修改任何配置的情况下redis会通过默认端口 + 本机即可正常访问确保redis-server打开即可。

启动redis-server的命令为
```bash
redis-server

后台执行可以使用nohup或pm2若您全局安装了pm2可使用以下命令启动redis服务器

npm run start:redis

create database 先创建数据库

mysql -e 'CREATE DATABASE IF NOT EXISTS RAP2_DELOS_APP DEFAULT CHARSET utf8 COLLATE utf8_general_ci'

initialize 初始化

npm install

confirm configurations in /config/config.dev.js (used in development mode)

确认/config/config.dev.js中的配置(.dev.js后缀表示用于开发模式)

TypeScript compile TS编译

Installing TypeScript Compiler Docs 安装TypeScript编译器文档: https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html

npm run build

initialize database 初始化数据库

npm run create-db

execute mocha test cases & js code check

执行mocha测试用例和js代码规范检查

npm run check

start server in development mode, watch & restart automatically

启动开发模式的服务器 监视并在发生代码变更时自动重启

npm run dev


### production 生产模式

```sh

# 1. change server config in /config/config.prod.js
# 1. 修改/config/config.prod.js中的服务器配置

# 2. start server in production mode
# 2. 启动生产模式服务器
npm start

Author

  • Owner: Alimama FE Team
  • Author:
    • Before v2.3: all by @Nuysoft, creator of mockjs.
    • v2.4+ / CE version: Bosn(creator of RAP1) 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