-
Notifications
You must be signed in to change notification settings - Fork 17
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
Remove reliance on express to work as bare connect middleware #1
Comments
We use a few of express's enhancements to the req/res objects, so this isn't actually true. Removing this reliance by using the lower-level nodejs http apis is definitely possible and does not add much complexity. Refs: #1
I would vote for an even smaller promise/async based API so that you can just add a few wrappers, this way supporting Koa for example is also easy. Even allows for easy integration with non HTTP based APIs. |
I think that a Note that paypercall is built on top of lightning-charge-client-js, which itself exposes a promise-based API that can be used directly for projects that needs more flexibility than what paypercall provides. |
This is what I meant. Apologies, I couldn't find this the first time I looked through the code!
I agree that connect is a big standard in the nodejs ecosystem, it is probably safer to create a solid basis around a connect plugin over a barebone implementation (that would just wrap around lightning-charge-client-js anyway). From a Koa perspective: there are ways to koafy a connect plugin on the fly, such as https://github.com/vkurchatkin/koa-connect but they are not as clean. Since promises and async/await is available natively I consider them to be cleaner. Though connect is so much bigger that it doesn't make sense. |
No description provided.
The text was updated successfully, but these errors were encountered: