Open pcimino opened 10 years ago
Tackled the last bullet today. Most of the modules (config, auth) can now be pulled in using require instead of passed as method args.
Last night I looked at modularizing the methods. The comment was: Avoid passing the request/response objects all the way down the chain.
The problem I'm having is each call is a nested chain of callbacks and promises. So breaking out the functionality into methods doesn't work since almost everything is asynchronous. Putting them in promise chains will create many extra methods, And I still have to pass around the response object. So not sure how to tackle this yet.
Cleaned up the get() to use the stream pipe instead of multiple code blocks.
Had a code roast, here are some of the suggetions I want to work on next....