-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Upgrade to Express 4.x #293
Conversation
"method-override": "~1.0.2", | ||
"cookie-parser": "~1.1.0", | ||
"morgan": "~1.1.1", | ||
"errorhandler": "~1.0.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK loopback should not include middleware modules in its dependencies, so that the app does not have to install middleware it does not need. That's to point of using a safe require in the wrapper object, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of them are required by LoopBack for runtime and testing. I think we need to flush out the template for scaffolded app.js
first. There might be opportunities to remove or move the deps to dev/optional sections after that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the minimal app.js
that works:
var app = loopback();
app.use(loopback.rest());
app.listen(3000);
IMO loopback should bundle only middleware required to make the example above work, plus any middleware required by loopback custom middleware like loopback.token
.
Modules required by loopback tests should be declared as dev dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not worry about the app.js
scaffolded by loopback-workspace, loopback-workspace can scaffold the appropriate dependency entries in package.json.
|
LGTM. |
/to @ritch @bajtos