![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Node
文章平均质量分 55
注目羔羊
学无止境...
展开
-
Nodejs - fs模块
fs模块 fs文件系统用于对系统文件及目录进行读写操作。 文档地址:fs 常用方法: const fs = require('fs'); // 检测目录或文件 fs.stat('./package.json', (err, data) => { if (err) { console.log(err); return; } console.log(`是文件:${data.isFile()}`); console.log(`是目录:${原创 2021-01-14 16:55:30 · 100 阅读 · 0 评论 -
Node.js - http模块 、 url模块 和 querystring模块
http模块 Node.js 可以做到不借助 Apache、Nginx 等来搭建 HTTP 服务器,Nodejs提供了http模块,自身就可以用来构建服务器。 文档地址:HTTP 搭服务器: 创建 app.js文件; 命令行运行:node app.js; 打开浏览器输入:http://127.0.0.1:8081/ // app.js var http = require('http'); var url = require('url'); http.createServer(function(requ原创 2021-01-13 14:17:58 · 326 阅读 · 0 评论 -
Node.js - Commonjs模块化
自学笔记。原创 2020-11-23 21:06:32 · 167 阅读 · 0 评论