open-rest-with-mysql
基于 mysql 以及 Sequlize 用来做存储的,open-rest 的一个基础model类型插件, 是目前使用最为广泛的技术组合
Node version
>= 6
Open-rest version
>= 8
Installation
npm install open-rest-with-mysql --save
Usage
const openRest = require('open-rest');
const getter = require('open-rest-helper-getter');
const assert = require('open-rest-helper-assert');
const rest = require('open-rest-helper-rest');
const params = require('open-rest-helper-params');
openRest
.plugin(U.openRestWithMysql)
.plugin(getter, assert, rest, params)
.start(`${__dirname}/app`, (error) => {
if (error) {
console.error(error);
process.exit();
}
console.info(`Service started at: ${new Date()}`);
});