Chapter 11. Production and beyond

 

This chapter covers

  • Logging and server events
  • Documenting with Lout
  • Monitoring and application metrics
  • Debugging with Node Inspector, Poop, and hapi TV
  • Deploying apps with SSL

Picking your framework and developing your app’s features are merely the beginning. When you get it into production and have real users, you need to concern yourself with logging, monitoring, user privacy, security, and many other things. You also need to ensure there are adequate methods for debugging when (not if) something goes awry. Documentation is also super-important for the maintainability of your projects.

This chapter contains some pointers on these matters and introduces a few tools and techniques to get you well on your way to having both happy users and coworkers.

11.1. Logging with hapi and Good

When a problem occurs in a production app, logs can be your best friend. So it’s important that you think about what makes sense to log in your application. I’m not going to tell you what to log because every app is different. Rather, I’m going to introduce to you the concepts and the tools offered by the framework to produce and manage logs.

11.1.1. Introduction to server events in hapi

11.2. Documenting your routes

11.3. Monitoring

11.4. Debugging

11.5. Deploying SSL/TLS-enabled applications

11.6. Summary