Follow these steps to initialize MongoDB and create a new database called mean-db:
- First we will need to start the MongoDB process locally, so we can connect to it. This process will need to remain running for all the sections of this chapter:
mongod
- This will spawn a new live process in our terminal for mongoDB. We can watch this process to see events and updates sent to MongoDB. In another terminal, we can enter the MongoDB shell:
mongo
- This will bring up a command prompt for MongoDB that we can use to send commands to it. We will use this shell to create a new database for our project. The use command will tell Mongo this is the name of the database we want to work with. By providing a new database name to MongoDB, ...