0
点赞
收藏
分享

微信扫一扫

Ubuntu20.04.6镜像自定义制作

minute_5 2023-07-20 阅读 48

(创作不易,感谢有你,你的支持,就是我前行的最大动力,如果看完对你有帮助,请留下您的足迹)

目录

Node.js 入门 

什么是 Node.js?

什么是前端工程化?  

Node.js 为何能执行 JS? 

fs 模块 - 读写文件 

path 模块 - 路径处理

URL 中的端口号 

常见的服务程序 

Node.js 模块化

什么是模块化? 

CommonJS 标准 

ECMAScript 标准 - 默认导出和导入  

包的概念  

npm - 软件包管理器 

npm - 全局软件包 nodemon

Node.js 总结  


Node.js 入门 

什么是 Node.js?

什么是前端工程化?  

Node.js 为何能执行 JS? 

fs 模块 - 读写文件 

//1.加载fs模块对象
const fs = require('fs')
//2.写入文件内容
fs.writeFile('./test.txt','hello world',(err)=>{
if(err){
console.log(err)
}
else{
console.log('写入成功')
}
})
//3.读取文件内容
fs.readFile('./test.txt',(err,data)=>{
if(err){
console.log(err)
}
else{
console.log(data.toString())
}
})

path 模块 - 路径处理

URL 中的端口号 

常见的服务程序 

Node.js 模块化

什么是模块化? 

CommonJS 标准 

ECMAScript 标准 - 默认导出和导入  

包的概念  

npm - 软件包管理器 

npm - 全局软件包 nodemon

Node.js 总结  

举报

相关推荐

0 条评论