-
Notifications
You must be signed in to change notification settings - Fork 1
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
Adding a 'proxies' section to the Jefferson configuration #2
Conversation
darthtrevino
commented
Mar 18, 2015
- Proxies are objects with an 'init' method. The init method accepts a delegate middleware and returns a middleware function. It is expected that the proxy invokes the delegate.
Looks good. I love mocha - makes that sort of test so easy. |
Mocha is great! We're also using supertest to directly test the express app object's responses https://github.com/visionmedia/supertest |
You should put a Promise example in the readme. I think proxies are a good compromise on the seam - no forced dependency, but the power to convert your middleware as needed. Means you can mix and match middleware types too, so you can pull in other libs that may not be promisified. |
It may be worthwhile to capture some common proxies that we consider to be useful and store them in a 'proxies' folder. Then clients could use |
👍 to boilerplate proxies |
Adding promise conversion proxy example
* Adding a promise-handling proxy * Combining src and test
…-proxies * '1-proxies' of github.com:atsid/express-jefferson: Update README.md Update README.md
…of snake_casing to match the library idioms. * Updating the npmignore so that coverage isn't published * Updating the output of the library code so that require('') on sub-paths will behave normally
I think this PR is about ready to roll. When travis gives me the greenlight I'll merge it. |
Adding a 'proxies' section to the Jefferson configuration