egg-qingger-typeorm
Install
$ npm i egg-qingger-typeorm --save
Usage
// {app_root}/config/plugin.jsexportsqinggerTypeorm = enable: true package: 'egg-qingger-typeorm';
Configuration
// {app_root}/config/config.default.js// see detail : http://typeorm.io/#/connection-optionsexportsqinggerTypeorm = "type": "mysql" "host": "localhost" "port": 3306 "username": "test" "password": "test" "database": "test" "synchronize": true "logging": false "entities": "src/entity/**/*.ts" "migrations": "src/migration/**/*.ts" "subscribers": "src/subscriber/**/*.ts" ;
see config/config.default.js for more detail.
Example
// @see detail : http://typeorm.io/ // save object const photo = ; photoname = 'P1'; photofileName = 'p1.png'; photoisPublished = true; photoviews = 0; let ret = await thisappqinggerTypeormmanager;
Questions & Suggestions
Please open an issue here.
Update
注意,不使用dist目录下编译的文件$ tsc$ git add . / git commit$ npm config set registry https://registry.npmjs.org/$ npm login $ npm whoami$ npm version patch / minor / major$ npm publish$ npm logout$ git push