Installation and testing of MongoDB installation +node.js

Source: Internet
Author: User
Tags install mongodb

A Mongodb

1. One of the most popular MongoDB in the current NoSQL database is a high-performance, open-source, modeless document-based database that installs MongoDB for testing

First time Installation

1. Installing Mongodb-win32-i386-3.2.9-signed.msi

2. Note: DBPath This is the location of the data warehouse, manually set up such a folder in advance (c:/data/db)

3. Open Win+r, enter cmd, go to MongoDB Bin directory C:\Program files\mongodb\server\3.2\bin, execute mongod--dbpath c:/data/db-- Storageengine=mmapv1

4. Reopen a CMD command window and must go to the MongoDB Bin directory to execute MONGO

Second execution

1. Executive Mongod

2. Open a new cmd and execute MONGO

The MongoDB command is written to the current environment variable, and access is performed under the cmd command.

1. Go to the MongoDB Bin directory and copy the directory structure C:\Program files\mongodb\server\3.2\bin

2. Right-click on the computer, click Properties, advanced system settings, advanced Systems environment variables, click Path Edit to write the copy directory results to the end of path, pay attention to the use of English symbols;

Two node. js

A simple word about what node. js is.

node. JS is a development platform that lets JavaScript run on the server side.

Installing the node. JS Test

Three The full name of NPM NPM:

Node Package Manager.

A management tool for node Package Manager package node. JS Connection MongoDB: With third-party MONGODB modules

NPM Install MongoDB

Four Actual operation

Introduction of MongoDB module in JS code

var MONGO = require (' MongoDB '). Mongoclient;

Article Source: http://h5.itxdl.cn/

Installation and testing of MongoDB installation +node.js

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.