Appendix. Other helpful modules

In this book, I covered a number of third-party Node modules, but there are myriad that I couldn’t get to. This appendix is a whirlwind tour of a bunch of modules I find useful. This list isn’t thorough and is by no means exhaustive, but I hope it can help you find modules you’ll like:

  • Sequelize is an ORM for SQL. In this book we discuss Mongoose, which deals with the Mongo database; Sequelize is the Mongoose of SQL databases. It’s an ORM that supports migrations and interfaces with various SQL databases. Check it out at http://sequelizejs.com/.
  • Lodash is a utility library. You may have heard of the Underscore library; Lodash is very similar. It boasts higher performance and a few extra features. You can read more at http://lodash.com/.
  • Async is a utility library that makes it easier to handle patterns in asynchronous programming. See more at https://github.com/caolan/async.
  • Request is almost the opposite of Express. Whereas Express lets you accept incoming HTTP requests, Request lets you make outgoing HTTP requests. It has a simple API, and you can find out more at https://www.npmjs.com/package/request.
  • Gulp calls itself the “streaming build system.” It’s an alternative to tools like Grunt, and it allows you to compile assets, minify code, run tests, and more. It uses Node’s streams to increase performance. See http://gulpjs.com/ for more information.
  • node-canvas ports the HTML5 Canvas API to Node, allowing you to draw graphics on the server. See the documentation at https://github.com/Automattic/node-canvas.
  • Sinon.JS is useful in testing. Sometimes you want to test that a function is called and a lot more. Sinon lets you make sure a function is called with specific arguments or a specific number of times. Check it out at http://sinonjs.org/.
  • Zombie.js is a headless browser. There are other browser testing tools like Selenium and PhantomJS that spool up real browsers that you can control. When you need 100% compatibility with browsers, they’re a good call. But they can be slow and unwieldy, which is where Zombie comes in. Zombie is a really quick headless browser that makes it easy to test your applications in a fake web browser. Its docs live at http://zombie.labnotes.org/.
  • Supererror overrides console.error. It makes it better, giving you line numbers, more info, and better formatting. Check it out at https://github.com/nebulade/supererror.

It’s a short list, but I wanted to tell you that I love these modules! For more helpful Node resources and modules, you can check out these sites: