First of all to ensure that the correct installation of mongodb, Installation Reference: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux
Then download the mongodb driver of nodejs
Npm install mongodb
Compile a test
Mongodb advanced 3: mongodb management and mongodb advanced management
Http://blog.csdn.net/stronglyh/article/details/46827141
Usually, there are many win development environments, but the production environment should be put on unix.
I.
********************************** Connect to the MongoDB database * * ************************* format ("mongodb: username: password @ address: Specifies the database by default on the port ", parameter) $ connnewMongo (); can be abbreviated as $
MongoDB-ConnectionIn this tutorial we will discuss different ways of connecting MongoDB.
Start MongoDB ServiceIn the previous tutorial, we have discussed how to start the MongoDB service, you only need to execute ' mongod ' in the bin
Java Operations on MongoDB1.1 Even single MongoDBMongo mg = newMongo ();//default 127.0.0.1 port is 27017Mongo mg = newMongo (IP);//You can specify that the IP port defaults to 27017Mongo mg = newMongo (ip,port);//can also specify IP and port number1
Node. js and MongoDB have been installed. The node. js used in this article is v0.12.0 and MongoDB is 3.0.0.
Node. js and MongoDB have been installed. The node. js used in this article is v0.12.0 and MongoDB is 3.0.0.
Prerequisites
Node. js and
Production Environment Best Practices1. Linux:1] disable the atime option of the file system/partitionVI/etc/fstabAdd noatime and nodiratime after the corresponding partition itemLabel =/1/ext3 defaults 1 1Label =/data1/Data ext4 defaults, noatime,
1.1 Even single MongoDBMongo mg = newMongo ();//default 127.0.0.1 port is 27017Mongo mg = newMongo (IP);//You can specify that the IP port defaults to 27017Mongo mg = newMongo (ip,port);//can also specify IP and port number1.2 Double-stage MongoDBIP
Write in frontThe recent reading of the node. JS Learning Guide does not introduce much to MongoDB, but for a front-end developer, even if you haven't used the database, you can understand and use it well.A very good introduction to the Book of node.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.