NODEJS development environment and plug-in installation

Source: Internet
Author: User
Tags create directory

★nodejs Installation

S1. Preparation before installation: Download Nodejs

S2. Installing Path:d:\program Files\nodejs using the default method

S3. The cmd command node-v check whether the installation was successful.

S4. Node pageaged Modules (NPM) can install a rich node. JS Library to complete the actual development requirements.

NPM command

View Help: NPM help/npm H

Installation module: NPM install <module name>/npm install-g <module name>

Unload module: Ninstall <moudle name>

Displays the modules installed in the current directory: NPM list

S5. Plug-in installation

★MONGODB Installation

=>1. Installing Mongodb-win32-x86_64-2008plus-ssl-3.4.2-signed.msi to Path:

D:\Program files\mongodb\server\3.4\

D:\Program Files\mongodb\server\3.4\bin

=>2. Installing Patches WINDOWS6.1-KB2999226-X64.MSU

Use Mongod.exe to register the data storage directory, Mongod.exe--dbpath d:\data\db

CMD Directory Command:

C:\>d: Enter d:\> change path

Cd.. Back to upper level

Cd files go to the next level

Go to the specified directory: D:\>CD D:\Program files\mongodb\server\3.4\bin

Create directory: D:\>mkdir data\db generate directory D:\data\db

Interrupt cmd is performing the task: Press CTRL + C

WIN + R to bring up the run window

=>3. Registering as a Windows service and setting up auto-start on boot

Configure Mongod.cfg

echo logpath=d:\data\log\mongod.log> "D:\data\mongod.cfg"

echo dbpath=d:\data\db>> "D:\data\mongod.cfg"

Registering Windows services with Sc.exe

MARK:SC Create XXX No line break

=>4. Using Windows services to open MongoDB and turn off MongoDB---failed

net start MongoDB

net stop MongoDB

The second way

d:\> CD D:\Program Files\mongodb\server\3.4\bin

Mongod

=>5. Connecting a MongoDB Database

d:\> CD D:\Program Files\mongodb\server\3.4\bin

Mongo

Simplified Connectivity MongoDB Service

Configure system Environment variables: D:\Program files\mongodb\server\3.4\bin

Enter d:\> c:\users\envy15>d:

Start database service: Mongod

Connect database service: MONGO

Exception problem:

Q1. Api-ms-win-crt-runtime-l1-1-0.dll lost

Reference:

KB2999226 x64

About the Api-ms-win-crt-runtimel1-1-0.dll missing solution

Q2. After MongoDB service can not start how to solve

Log:couldn ' t connect to server 127.0.0.1:27017 src/mongo/shell/mongo.js:91

Exception:connect failed.

Reference:

After the installation of MongoDB service can not start how to solve

Q3. Delete/Create a Windows service with Sc.exe

Delete: C:\WINDOWS\SYSTEM32>SC Delete serviceName

Created: Sc.exe Create XXX

Reference:

Remove Windows services with Sc.exe

Reference:

Windows System Installation MongoDB

MongoDB Installation and Setup MongoDB service

Download website

★mongoose Installation

NPM Install Mongoose

Reference:

Nodejs Study Notes (14)-mongoose Introduction and Getting Started

Mongoosejs official website

Reference:

Nodejs Study notes (i)---profile and install the node. JS Development environment

★express Installation

NPM Install-g Express

NPM install-g Express-generator

Reference:

Express is not an internal or external command

Installation Error Issue:

NPM WARN enoent enoent:no such file or directory, Xxx\package.json

WORKAROUND: Switch to the NODEJS installation directory to install

D:\Program FILES\NODEJS\NODE_MODULES\NPM

NODEJS development environment and plug-in installation

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.