-
-
Notifications
You must be signed in to change notification settings - Fork 3.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
accept options in the Application constructor #1372
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1372 +/- ##
======================================
Coverage 100% 100%
======================================
Files 4 4
Lines 377 378 +1
======================================
+ Hits 377 378 +1
Continue to review full report at Codecov.
|
Update the document https://github.com/koajs/koa/blob/master/docs/api/index.md#application ? |
lib/application.js
Outdated
* @param {object} [options] Application options | ||
* @param {string} [options.env='development'] Environment | ||
* @param {string[]} [options.keys] Signed cookie keys | ||
* @param {string} [options.proxy] Trust proxy headers |
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.
options.proxy is not a string, but a boolean
* @param {string} [options.proxy] Trust proxy headers | ||
* @param {number} [options.subdomainOffset] Subdomain offset | ||
* | ||
*/ |
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.
For consistency, add a newline between constructor
-method and */
.
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.
LGTM
Accept an options object on the application constructor to configure app.env, app.proxy, app.keys, and app.subdomainOffset.
#1370