Last active
August 29, 2015 13:57
-
-
Save garystafford/9717295 to your computer and use it in GitHub Desktop.
From blog post, Retrieving Data with AngularJS and the MEAN Stack: http://wp.me/p1RD28-16F. Install the sample database, collection, and documents.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start mongod # starts mongod in a separate window | |
mongo # starts interactive MongoDB Shell for remaining commands | |
# tip: once the mongo shell has started, you can copy and paste | |
# the commands below into the shell, all at once | |
use meanstack-test // creates database if it does not exist | |
db.components.insert({ "component": "mongod", | |
"description": "core database process" }) | |
db.components.insert({ "component": "mongos", | |
"description": "controller and query router for sharded clusters" }) | |
db.components.insert({ "component": "mongo", | |
"description": "interactive MongoDB Shell" }) | |
db.components.insert({ "component": "mongodump", | |
"description": "utility for creating binary export of database contents" }) | |
db.components.insert({ "component": "mongorestore", | |
"description": "writes data from a binary database dump to a MongoDB instance" }) | |
db.components.insert({ "component": "mongooplog", | |
"description": "polls operations from the replication oplog" }) | |
show collections // verifies the components collection was created | |
db.components.find().pretty() // verifies documents were created |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment