Lesson 11. Configurations and error handling

In lesson 10, you added Embedded JavaScript (EJS) to your application views. In this lesson, you add finishing touches to your application by modifying your package.json file to use a start script. This script changes the way that you start your application from terminal. Then you add error handling middleware functions to log errors and respond with error pages.

This lesson covers

  • Changing your application start script
  • Serving static pages with Express.js
  • Creating middleware functions for error handling
Consider this

You’re in full swing developing your recipe application. As is common in programming, you run into many errors, but you have no clear indication of those errors in your ...

Get Get Programming with Node.js 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.