post_img

06-HTTP模块

摘要

HTTP模块 简单的HTTP服务器 const http = require(“http”); const server = ht …

post_img

05-常用工具模块

摘要

常用工具模块 Util模块 方法名 描述 util.format(format[,…args]) 格式化输出,c语言的prin …

post_img

04-路径模块

摘要

路径模块 本地路径模块 解析路径 方法名 描述 path.dirname(path) 获取文件的所在目录 path.basenam …

post_img

03-文件系统

摘要

文件系统 缓冲区 全局模块,作用于输入输出流的数据 静态方法 方法名 描述 Buffer.from(obj) 将数组、对象、字符串 …

post_img

02-进程模块

摘要

进程模块 全局模块,该对象存储node进程相关信息 属性名 描述 process.argv 执行node时的参数列表,比如node …

post_img

01-模块化规范

摘要

模块化规范 CommonJS 基本语法 const test = require(“./test”); //模块导入 //会先将t …