June 2017
Intermediate to advanced
536 pages
9h 49m
English
Running the mongo command on the Ubuntu terminal gets us into a mongo interactive shell. From here on, with a simple few commands, we can add the sample data:
use foggylinedb.products.insert({name: "iPhone 7", price: 650, weight: "138g"});db.products.insert({name: "Samsung Galaxy S7", price: 670, weight: "152g" });db.products.insert({name: "Motorola Moto Z Play", price: 449.99, weight: "165g" });db.products.insert({name: "Google Pixel", price: 649.99, weight: "168g" });db.products.insert({name: "HTC 10", price: 799, weight: "161g" });show dbsshow collections
This should give us an output much like the following screenshot:
Using use foggyline and db.products.find(), we are able to now list all the entries added to ...
Read now
Unlock full access