-
Notifications
You must be signed in to change notification settings - Fork 28
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
Is modelsDir option needed? #43
Comments
hi @vshulev, Depending of your app implementation you will need it or not. If your models have already been required, before the liana integration call then it is not a necessary option. Have fun using Forest! |
I'm using https://www.npmjs.com/package/@decorators/mongoose for my models and the modelsDir didn't work for that so I thought I was stuck until I saw this issue. |
Hey @Christilut, I agree this should be documented. |
Well I'm using the above decorators so I wasn't excepting forest to work out of the box with them. So I don't think that's a bug. I'm already glad to see that forest works with |
I noticed that there is no mention of
modelsDir
when I search the source code of the project. I am also seeing that there is agetModels
function which actually gets the models frommongoose.models
. So ismodelsDir
actually a required configuration option?I am asking because our models are enclosed in functions like:
and so we can't really pass a models folder to
forest-express-mongoose
without some build step first.The text was updated successfully, but these errors were encountered: