Chinaunix首页 | 论坛 | 博客
  • 博客访问: 62167
  • 博文数量: 9
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 318
  • 用 户 组: 普通用户
  • 注册时间: 2014-01-22 16:06
文章分类
文章存档

2014年(9)

分类: 网络与安全

2014-02-17 11:21:12

/**
* Created with JetBrains WebStorm.
* User: liangxinglei
* Date: 14-2-17
* Time: 上午9:43
* To change this template use File | Settings | File Templates.
*/
var http = require('http');
var server = http.createServer(function (req, res) {
   res.writeHead(200, {'Content-type': "text/plain;charset=UTF-8"}); // 设置编码
   res.end("这是我的第一个Node.js程序");
});
server.listen(8000);
阅读(1669) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~