1、首先在官网http://www.nodejs.org/下载NODE.JS2、打开命令行CMD,进入NODEJS\node_modules\的目录,输入npm install socket.io 安装socket.io模块.别急着关掉此CMD窗口,后面有用3、搭建服务端代码server.js 1 ...
分类:
Web程序 时间:
2014-08-17 21:07:02
阅读次数:
376
JS是脚本语言,脚本语言都需要一个解析器才能运行。对于写在HTML页面里的JS,浏览器充当了解析器的角色。而对于需要独立运行的JS,NodeJS就是一个解析器。每一种解析器都是一个运行环境,不但允许JS定义各种数据结构,进行各种计算,还允许JS使用运行环境提供的内置对象和方法做一些事情。例如运行.....
分类:
Web程序 时间:
2014-08-17 17:00:42
阅读次数:
334
一、安装 ①先安装NodeJS(如果有的就不用安装了) http://nodejs.org/ ②、sudo npm install -g phonegap 需要等待安装完成 ③、检测是否安装成功 node -v 如果出现版本信息就是安装成功。如果没有请重新安装二、使用phoneGap...
分类:
其他好文 时间:
2014-08-17 15:28:52
阅读次数:
218
Managing Data in Containers
So far we've been introduced to some basic Docker concepts, seen how to work with Docker
images as well as learned about networking and links between containers. In th...
分类:
其他好文 时间:
2014-08-17 13:06:32
阅读次数:
271
Linking Containers Together
In the Using Docker section we touched on connecting to a service running inside a Docker container via a network port. This is one of
the ways that you can interact w...
分类:
其他好文 时间:
2014-08-17 11:46:32
阅读次数:
245
win7(我用的是笔记本)在nodejs官方网站下载.msi文件安装,安装到一半的时候,进度条提示:roll back,because of a error.node.js setup wizard ended prematurely.最后手动安装下exe载包和配置环境变量。这篇文章里面说到要自己编...
分类:
Web程序 时间:
2014-08-17 11:40:32
阅读次数:
262
var multipart = require('connect-multiparty');var fs = require('fs');var multipartMiddleware = multipart();router.get('/uploadTest', function (req, re...
分类:
Web程序 时间:
2014-08-17 11:35:02
阅读次数:
205
1.通过config命令 npm?config?set?registry?http://registry.cnpmjs.org?npm?info?underscore?(如果上面配置正确这个命令会有字符串response) 2.命令行指定 npm?--registry?http://registry.cnpmjs....
分类:
Web程序 时间:
2014-08-17 10:30:52
阅读次数:
221