学习 nodejs - 环境安装配置

本文提供了Node.js的手动及自动安装指南。手动安装包括下载最新版本的Node.js和npm,并将其添加到系统的PATH变量中。自动安装则通过下载.msi安装包进行。安装完成后,可以在任意目录运行Node.js和npm命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

安装指南在此https://github.com/joyent/node/wiki/Installation

Installing on Windows

Manual install

Installing Node manually is recommended as a workaround for any problems with automatic install. You also have much better understanding of the things that happen if you do those things yourself.

The http://nodejs.org/dist/latest/ directory contains executables of the last version of Node.js engine (the engine only, i.e. without npm):

The http://nodejs.org/dist/npm/ directory contains the latest .zip archive of npm (such as npm-1.1.16.zip when npm v1.1.16 was the latest).

Manual installation steps:

  1. Make a clean directory and add that directory to your system's PATHvariable.

  2. Download the latest node.exe to that directory.

  3. Download the latest npm's .zip file and unpack its contents to the same directory.

Then, with the usual help of PATH, you'll be able to run scripts (node scriptname.js) and install modules (npm install modulename) in any directory.

Manual update

To update Node, download the latest http://nodejs.org/dist/latest/node.exe (orhttp://nodejs.org/dist/latest/x64/node.exe for 64bit systems) and replace your oldnode.exe with it.

To update npm, run the npm update npm -g command.

Automatic install (with Microsoft Installer)

The http://nodejs.org/dist/latest/ directory contains the latest .msi package (such as node-v0.6.15.msi when Node v0.6.15 was the latest) that you may use to install both Node.js engine and npm.

 

由于我的是64位,而且懒得手动安装,就直接跑到http://nodejs.org/dist/latest/x64/

下载.msi文件自动安装。安装成功后,可以看到环境变量path里有配nodejs,可以执行node/npm命令了。

 

nodeJS打造mvc框架学习例子:http://www.cnblogs.com/ppoo24/archive/2012/02/08/2343064.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值