Nodejs explanation and installation under Win7

Source: Internet
Author: User

What is NodeJs

First you need to understand that Nodejs is not a JS application, but a JS running platform. It is written by C + +. But Nodejs is a back-end operating environment. So you can write system-level or server-side JS let Nodejs help you execute. Nodejs Disadvantages (according to what others say)

1, unified language. The whole team except me, are just graduating (of course, there is a learning curve, but after the good), now everyone back and forth all-in-one, there is a problem who can always chase from the front to the database. 2, unified model. If you are accustomed to async and callbacks, then with facilities such as REDIS/MQ, thinking will be very consistent. 3, the community is active. All kinds of packages, almost all the desired needs, all have been made to package out NPM a pack just fine. Nodejs advantages (according to what others say)

1, some package maturity is not high, sometimes need to debug package internal problems, have encountered several times, fortunately, are open source, although the cost of strength, but most can be solved. 2, easy to write bad code, callback execution process is sometimes not very intuitive, need to periodically review and refactoring to avoid downloading the installation files

: http://www.nodejs.org/download/Installation Nodejs

Double-click Node-v0.12.1-x64.msi to start the installation of Nodejs, which is installed by default in C:\Program Files\nodejs installation related environment

Open the C:\Program Files\nodejs directory you'll find it comes with NPM, and you can install it directly into the node. js Command Prompt commands window into the Nodejs installation directory C:\Program files\ Nodejs Type command: CD C:\Program Files\nodejs is available.

Now start the installation related environment Type command: NPM Express return to wait for installation Express. Type the command: NPM Jade return to wait for the installation of Jade. Type the command: NPM MySQL enter waiting to install MySQL. What components to install, depending on the environment to build the requirements to create a project

By default, the above components are installed under the C:\Program Files\nodejs\node_modules folder, which is also the auto-find path for NODEJS related components.

Now there's an express

The Express command is installed at the Global to work!

So the express installation should be used npm install express -g

or modify the global path directly:

`npm config set prefix "C:\Program Files\nodejs"``npm config set cache "C:\Program Files\nodejs\cache" `

(The cache directory is built first.)

Type: Express MyApp (MyApp is a random project name)

You'll find one more C:\Program. Files\nodejs\myapp Directory

By default: It is created automatically. Copy the Node_modules under MyApp

The construction of the environment was completed.

Nodejs explanation and installation under Win7

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.