MERN Quick Start Guide
上QQ阅读APP看书,第一时间看更新

How to do it...

Visit the documentation website of MongoDB at https://docs.mongodb.com/master/installation/ for instructions and check the Tutorials section for your specific platform.

After installation, an instance of mongod-, the daemon process for MongoDB-, can be started in a standalone fashion:

  1. Open a new Terminal
  2. Create a new directory named data, which will contain the Mongo database
  3. Type mongod --port 27017 --dbpath /data/ to start a new instance and create a database
  4. Open another Terminal
  5. Type mongo --port 27017 to connect a Mongo shell to the instance