Refactoring and improvements

At this point, the application that we've been building is pretty much complete! Before we iterate anymore on the project and continue to build it out and make it ready for production, we should probably consider some refactoring and/or general improvements. Some areas that I would personally take a look at to refactor and/or rewrite to improve the application's performance and overall sanity are as follows:

  • I might rethink working directly with models so much within the controllers and instead create a utility that I can wrap a lot of that noise and rely on more basic CRUD calls to my models and only provide a callback to each. This is most visible in the image controller with like, comment, and remove.
  • There is literally ...

Get Web Development with MongoDB and NodeJS - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.