Introduction
Mean is a full stack development framework for JavaScript. More about
The storage of persistent data with MongoDB is a part of mean web full stack development.
MongoDB is a product between a relational database and a non-relational database, and is the most versatile and most like relational database in a non-relational database. It is characterized by high performance, easy to deploy, easy to use, and easy to store data.
MongoDB's learning materials can be consulted:
MongoDB Chinese Community
MongoDB Download and Installation
: https://www.mongodb.com/download-center#community
Select the appropriate. msi file based on your system download, double-click the file after downloading, and follow the instructions to install it.
MongoDB configuration file
1. After downloading, open the download path, mine is C:\Program files\mongodb\server\3.4,
Create a Data folder in it (for storage) and a log folder (for log), as well as a profile mongo.conf, as follows:
2. Write the following in the mongo.conf file, and then save:
dbpath = C: \ Program Files \ MongoDB \ Server \ 3.4 \ data #Database path
logpath = C: \ Program Files \ MongoDB \ Server \ 3.4 \ log #log output file path
logappend = true #Error log in append mode
journal = true #Enable journal files, enabled by default
quiet = true #This option can filter out some useless log information. If debugging is required, please set it to false
port = 27017 #port number default is 27017
3. Open the CMD command box CD to the MongoDB Bin directory and start MongoDB with the following command:
"C : \program Files\mongodb\server\3.4\mongo.conf "
4. After the command is executed, enter http://127.0.0.1:27017 in the browser to see the following interface that indicates the startup success
Create a MongoDB service
1. First, use the CMD command box CD to the MongoDB Bin directory, and then run the following command to create the service:
" C:\Program files\mongodb\server\3.4\mongo.conf " " MongoDB "
2. Then start the service with the following command:
net start MongoDB
3. If you need to uninstall the MongoDB service, first CD to the bin directory, execute the following command:
" MongoDB "
MongoDB Client Management tool
工欲善其事 its prerequisite, it is not very convenient to operate the database with a command box each time, here a MongoDB client management tool is used: NoSQL Manager for MongoDB.
Click to view
Next: Consider NoSQL Manager for MongoDB
"Database" Mean Web development 02-windows under MongoDB installation configuration and common client management tools