We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
There is a shorthand listen(...args) (line 86 in application.js) for http.createServer(app.callback()).listen(...) but no shorthand for:
listen(...args)
http.createServer(app.callback()).listen(...)
http2.createSecureServer(options, app.callback()).listen(...)
Could it be added? This way will be solved also a recent typing problem created by callback() return type. Thanks!
The text was updated successfully, but these errors were encountered:
FYI You could quite easily add this yourself as well by extending Koa.
class MyKoa extends Koa { listenSecure(...args) { return http2.createSecureServer(...) } }
Sorry, something went wrong.
Nice! But adding this myself does not decreases the code lines in my code. For this I proposed it as a new feature.
Describe the feature There is a shorthand listen(...args) (line 86 in application.js) for http.createServer(app.callback()).listen(...) but no shorthand for: http2.createSecureServer(options, app.callback()).listen(...) Could it be added? This way will be solved also a recent typing problem created by callback() return type. Thanks!
It is not possible as the http2 is not imported into Koa and I guess http2 is not officially supported.
Submitted a PR for this here #1833
No branches or pull requests
Describe the feature
There is a shorthand
listen(...args)
(line 86 in application.js) forhttp.createServer(app.callback()).listen(...)
but no shorthand for:Could it be added? This way will be solved also a recent typing problem created by callback() return type.
Thanks!
Checklist
The text was updated successfully, but these errors were encountered: