https://github.com/tea-node-js/tea-rest-plugin-mysql
https://github.com/tea-node-js/tea-rest-plugin-mysql
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tea-node-js/tea-rest-plugin-mysql
- Owner: tea-node-js
- Created: 2019-01-30T03:47:10.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-06T14:50:08.000Z (over 3 years ago)
- Last Synced: 2025-05-27T16:05:32.661Z (about 1 year ago)
- Language: JavaScript
- Size: 308 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tea-rest-with-mysql
MySQL & Sequlize as store, Base on tea-rest
## Node version
>= 8
## tea-rest version
>= 8
## Installation
```bash
npm install tea-rest-plugin-mysql --save
```
## Usage
```js
const teaRest = require('tea-rest');
const getter = require('tea-rest-helper-getter');
const assert = require('tea-rest-helper-assert');
const rest = require('tea-rest-helper-rest');
const params = require('tea-rest-helper-params');
teaRest
.plugin(U.teaRestPluginMysql)
.plugin(getter, assert, rest, params)
.start(`${__dirname}/app`, (error) => {
if (error) {
console.error(error);
process.exit();
}
console.info(`Service started at: ${new Date()}`);
});
```