Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support a collection in the modelPath config property #14

Open
viktor1190 opened this issue Apr 6, 2017 · 0 comments
Open

Support a collection in the modelPath config property #14

viktor1190 opened this issue Apr 6, 2017 · 0 comments

Comments

@viktor1190
Copy link

viktor1190 commented Apr 6, 2017

The configuration have a property to customize the models route:

config.modelPath = 'models';

This is a single path directory so all the models must be inside.
It would be great if I could set up a collection of files instead of a single directory

For example, I have the next project tree:

myProject/
  |- index.js
  |- server.js
  |- config/
  |- modules/
      |- users_module/
          |- handlers/
          |- models/
              |- user.model.js
      |- article_module/
          |- handlers/
          |- models/
              |- article.model.js

And my config would be:

config.modelPath = ['modules/users_module/models/user.model', 'modules/article_module/models/article.model']';

This feature can be very useful to support a large projects with modular directory structure, like the above example.

@viktor1190 viktor1190 changed the title Support a collection at modelPath config Support a collection in the modelPath config property Apr 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants