x41822n
修改egg-sequelize/lib/loader.js loadModel方法:
Last updated 2 years ago by glhf .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install x41822n 
SYNC missed versions from official npm registry.

x41822n

修改egg-sequelize/lib/loader.js loadModel方法:

const modelDirs = app.loader.getLoadUnits().map(unit => path.join(unit.path, 'app/model'));
app.loader.loadToApp(modelDirs, MODELS, {
  inject: app,
  caseStyle: 'upper',
  ignore: 'index.js',
});

QuickStart

$ npm install
$ npm test

publish your framework to npm, then change app's dependencies:

// {app_root}/index.js
require('x41822n').startCluster({
  baseDir: __dirname,
  // port: 7001, // default to 7001
});

Questions & Suggestions

Please open an issue here.

Current Tags

  • 1.0.0                                ...           latest (2 years ago)

1 Versions

  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (9)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |