syscoin/syscoin-api — pull request #2 by davidgwking (2014-09-14 07:26:04+00:00)
Title: various best practices improvements

- “next” should always be executed to properly end the route handler
chain and to aid in preventing leaky callback conditions
- slightly modified error handling pattern so that next is always called
- split test dependencies into devDependencies within package.json
- added scripts.test to package.json
- added case sensitivity on routes
- server.js now exports the app
- normalized quoting in server.js to single quotes
- refactored handleError so that it has the standard express error
handling middleware function signature
- supertest now binds directly to a server that starts when tests are
run
- migrated to chai.js, a better assertion library, in my opinion
- upgraded expressjs from 4.0 to 4.9 due to an apparent bug in the
app’s router class that appears to cause next functions to make a call
to res.send. appears to be fixed with the upgrade.