Adding locations to MongoDB

Now is the fun part of our application. We need to insert the records in our application; for didactic purposes, we will use the form (add-location.html) to insert the records one by one.

The example shows how to insert a record, and you should do the same for others.

Tip

You can skip this step and load the sample file that populates its database, but we recommend you follow the steps in this book.

At the end of this example, we will explain how to load all records at once using RoboMongo panel.

  1. Open terminal/shell at the project root folder and type the following command:
    gulp
    

    Tip

    Note that you must have your MongoDB up and running before taking the previous action.

  2. Go to http://localhost:3000/locations/add and fill in the ...

Get Node.js 6.x Blueprints 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.