O'Reilly logo

Mastering Web Application Development with Express by Alexandru Vlăduțu

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Error handling in a practical application

For the remainder of this chapter, we will create a sample microblogging application from scratch with error handling included.

Guests should be able to register, log in, and publish posts on the home page of the application. Everybody should be able to view published posts (from newest to oldest) and new post notifications should be sent in real time to the web interface. A counter will display the number of posts that have been published since viewing the page, and there will be a button for the users who want to load them.

We will use the following modules:

  • mongoose: This module will be used for the database layer (thus, MongoDB as the database)
  • EJS: This module will be used for rendering views
  • passport-local-mongoose ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required