首页 > 其他 > 详细

node项目中用到的一些模块

时间:2017-09-12 09:23:32      阅读:230      评论:0      收藏:0      [点我收藏+]

1、http模块,用来搭建服务器

代码,简单服务器实现

1 var http = require(http);
2 http.createServer(function (request, response) {
3   response.writeHead(200, {"Content-Type": "text/plain"});
4   response.write(hello word);
5   response.end();
6 }).listen(8888)

2、url模块,处理url路径的值

3、querystring模块,处理字符串

参考文章:http://www.jianshu.com/p/aed6a885db61

4、fs模块,处理文件

参考文章:http://www.jianshu.com/p/5683c8a93511

node项目中用到的一些模块

原文:http://www.cnblogs.com/zhaobao1830/p/7508125.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!