![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
nodejs
亦木丶
这个作者很懒,什么都没留下…
展开
-
配置electron在vscode 调试过程中出现的路径问题解决整理
在使用electron官方提供的配置文件是出现了如下问题,百度了好久没有发现有效的解决办法想了一下,既然是路径问题,不如直接配置一个electron的全局环境修改一下配置文件好了通过``安装全局的环境,修改配置文件如下{ "version": "0.2.0", "configurations": [ { "name": "Debug Main Process", "type": "node", "request": "launch",原创 2020-09-08 09:29:28 · 741 阅读 · 0 评论 -
『nodejs』path 模块
path 模块path模块路径片段连接成新的路径const path = require("path")const filePath = path.join(__dirname, "tmp", 'hello.txt') // 路径拼接原创 2020-07-08 18:52:59 · 136 阅读 · 0 评论 -
『nodejs』http 模块
http模块const fs = require("fs")const path = require("path")const http = require("http")let data// 设置头文件data = fs.readFileSync("./tmp/index.html","utf-8",(err,data)=>{ console.log(data)})console.log(data);const server = http.createServer((re原创 2020-07-08 18:52:06 · 195 阅读 · 0 评论 -
『nodejs』fs 模块
fs 模块fs 模块的作用是对文件的处理同步读data = fs.readFileSync("./tmp/index.html","utf-8")写data = fs.writeFileSync("./tmp/index.html","utf-8")异步读data = fs.readFile("./tmp/index.html","utf-8",()=>{})写data = fs.writeFile("./tmp/index.html","utf-8",()=>{原创 2020-07-08 18:51:28 · 140 阅读 · 0 评论 -
『nodejs』Crawler 模块
Crawler 模块安装npm i crawler示例var Crawler = require("crawler"); // 创建爬虫实例var c = new Crawler({ maxConnections : 10, // 这将为每个已爬网页面调用 callback : function (error, res, done) { if(error){ console.log(error); }else{原创 2020-07-08 18:49:52 · 618 阅读 · 0 评论