TypechoJoeTheme

拾光°の博客

登录
用户名
密码
/
注册
用户名
邮箱
标签搜索
搜索到 2 篇与 的结果
2021-03-21

node基础入门

node基础入门
fs模块//引入 Const fs =require('fs')读文件fs.readFile( dir_name , 'utf-8' ,fn)写文件fs.writeFile(dir_name,content,fn)Path 路径模块1. __dirname: 文件所在的绝对路径2. path.join(); 拼接路径使用3. path.baseName(); 获取文件名4. path.extName(); 获取文件拓展名//导入panth模块 const path = require("path"); fs.readFile(path.join(__dirname, "文件路径"), 'utf8', function (err, dataStr) {})Http模块导入httpConst fs =require('http')创建http服务const server = http.createServer();绑定请求事件server.on('request', function(req, res) { // 设置响应头 解决客户端...
拾光°
2021-03-21

javascript,node.js

377 阅读
0 评论
2021年03月21日
377 阅读
0 评论
24 文章数
371 评论量
IP信息

人生倒计时

今日已经过去小时
这周已经过去
本月已经过去
今年已经过去个月