
nodejs
AdministratorHack
This is a begin!
展开
-
Cannot find module 'body-parser'
bug:Cannot find module 'body-parser'原因很明显,这个模块是没有的,查看node_modules目录下,确实没有解决办法:重新安装这个模块;cmd 切换到 node安装目录:npm install --save body-parser原创 2017-09-01 10:25:38 · 30974 阅读 · 7 评论 -
nodejs之爬虫网页的信息
1."cheerio",一个nodeJS模块,类似于jquery,可以将html页面的char转换为document文档对象,然后用类似于jquery的方式进行操作DOM2.编写crawler.js文件3.在 crawler.js目录下使用如下命令安装cheerio: npm install cheerio4.然后运行 crawler.js//引进所需模块var http =原创 2017-10-23 15:08:17 · 938 阅读 · 0 评论 -
sublime text3代码格式化插件
第1个插件:(php代码格式化)1、下載文件:2、解压CodeFormatter.rar到插件目录;3、选择/首选项/package setting->CodeFormatter->setting-default配置php的路径;php配置版本必须大于6.5,我用的是phpstudy 2016搞定后直接ctrl+alt+f即可格式化原创 2017-12-13 19:56:44 · 8946 阅读 · 3 评论 -
Node.js 通过http调用外部接口
通过http.request发送带参数的post请求data:发送的内容opt:描述将要发出的请求data:事件在数据到达时被触发end:请求结束时触发error:发生错误时被触发[javascript] view plain copyvar http = require("http"); var data = {username:"hello",password:"123456"}; d...转载 2018-06-19 19:57:42 · 18561 阅读 · 0 评论