随笔分类 -  Nodejs

摘要:一、使用npm 安装一个模块 n 到全局 npm install -g n 二、使用 n 加版本号就可以安装其他版本,比如: n 6.11.3 三、再使用 n ,通过上下键,就可以选择不同的版本啦 (注意,是从低版本升到高版本时多版本共存;如果是已经安装了高版本,再安装低版本时,高版本就没有了) 阅读全文
posted @ 2017-05-19 01:04 conserdao 阅读(48651) 评论(0) 推荐(1)
摘要:const http = require('http');const hostname = '127.0.0.1';const port = 3000; const server = http.createServer((req, res) => { if(req.url!='/favicon.ic 阅读全文
posted @ 2017-05-18 10:51 conserdao 阅读(1163) 评论(0) 推荐(0)