O'Reilly logo

Continuous Integration, Delivery, and Deployment by Sander Rossel

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

The Login Page

Our next step is to create some method of logging in together with saving what is in our shopping cart. We are not going to create a full fledged web shop, so for the sake of learning, we will manually insert two users into the database, so we can log in and remember what is in each of their shopping carts. Before we can save anything to MongoDB, we must first create a login page for our website. Create a view and name it login.ejs. The contents are pretty much the same as that on other pages. Same stylesheets, scripts, and footer. The part that is different goes in container div. I am using a form element so Angular does the required validation for us. Other than that, it is not much different from doing a regular AJAX POST ...

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