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

Saving to MongoDB

The next step is getting our users from the database. As we said, we are not going to create a registration method, so we will need to insert at least one user manually. You can log in to the webshop database using Robomongo. Right-click on Collections and choose Create collection.... Name your new collection user. Now, you can right-click on the user collection and pick Insert Document.... The document you are going to insert is just a JavaScript object, so enter some object with the username and password properties:

You can now browse the newly inserted document(s):

We can now query the database from Node and check for ...

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