0.0.3 • Published 2 years ago

typegoose-egg v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

egg-typegoose

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i typegoose-egg --save

Usage

// {app_root}/config/plugin.js
exports.typegoose = {
  enable: true,
  package: 'typegoose-egg',
};

Configuration

// {app_root}/config/config.default.js
exports.typegoose = {
    url: '',
    options: {},  // 参考mongoose的options
    modelWhitelist: [],  // 忽略的模型。
    modelFilePath: 'app/model',  // 需要手动在typings下建立相同目录,并创建index.d.ts文件。后续在项目启动时会自动生成
};

see config/config.default.js for more detail.

License

MIT