node.js介绍及Win7环境安装测试
来源:互联网 发布:java设置编码格式 编辑:程序博客网 时间:2024/05/16 23:54
下载安装:
点击http://nodejs.org/,进入官网,下载windows版本:http://nodejs.org/dist/v0.6.6/node-v0.6.6.msi
下载完成后,直接点击安装:
默认安装目录:C:\Program Files\nodejs
安装完成,不生成快捷方式,手动去安装目录查看即可;
安装完成后目录下,一个node.exe\npm.cmd\node_modules(文件夹);
安装包会自动把安装路径写入环境变量path中,可进行全局访问;
安装测试:
打开cmd命令窗口,输入node,回车;
cmd窗口会出现”>”输入".help”,回车;
> .help
.break Sometimes you get stuck, this gets you out
.clear Break, and also clear the local context
.exit Exit the repl
.help Show repl options
.load Load JS from a file into the REPL session
.save Save all evaluated commands in this REPL session to a file
恭喜您基本安装成功!
开始一个HelloWorld:
在D盘建立一个文件夹:Nodejs
在些文件夹下新建一个文本文件,并输入
var http = require('http');
http.createServer(function (request, response) {
response.writeHead(200, {'Content-Type': 'text/plain'});
response.end('Hello World\n');
}).listen(8124);
console.log('Server running at http://127.0.0.1:8124/');
保存,并重命名文件为"HelloWorld.js”;
打开cmd命令窗口:
D:\Nodejs>node HelloWorld.js 回车;
Server running at http://127.0.0.1:8124/
在本地浏览器地址中,输入:http://127.0.0.1:8124/,OK,欢迎进入Node.js世界;
提示:在命令窗口下,按Ctrl+Break可结束刚启动HelloWorld--Web服务;
- node.js介绍及Win7环境安装测试
- node.js介绍及Win7环境安装测试
- node.js介绍及Win7环境安装测试
- node.js环境安装,及连接mongodb测试
- Node.js 介绍及安装
- node.js 环境源码安装测试
- win7安装node.js
- win7安装node.js
- Node.js简介及安装开发环境
- 安装测试node.js
- node.js安装、测试
- node js 安装 测试
- mac 上node.js环境的安装与测试
- mac 上node.js环境的安装与测试
- Windows环境下Node.js的安装与测试
- node.js在mac上环境安装与测试
- mac 上node.js环境的安装与测试
- MacOS上Node.js开发环境安装与测试
- cheap authentic jerseys from china free shipping
- "We just play that aggressive no matter who the opponent is
- a professor at DePaul talked on the host
- sports jerseys china
- wholesale stitched jerseys china
- node.js介绍及Win7环境安装测试
- " Lakers coach said
- cheap kids jerseys from china
- wholesale autographed jerseys
- 如何在x-code 5.1开始隐藏状态栏
- cheap youth practice football jerseys
- 自动开机调用迅雷下载数据库备份,完成后自动关机
- buy super bowl jerseys
- wholesale nfl jerseys supply