2020年2月19日

296 HTTP协议

摘要: js const http = require('http'); const app = http.createServer() app.on('request', (req, res) = { if(req.method === 'GET') { res.end('gett') } else if 阅读全文

posted @ 2020-02-19 21:21 冲啊! 阅读(379) 评论(0) 推荐(0) 编辑

294 服务器端基础概念,nide.js创建web服务器

摘要: nide.js创建web服务器 const http = require('http'); // 引用系统模块 const app = http.createServer(); // 创建web服务器 // 当客户端发送请求的时候 app.on('request', (req, res) => { 阅读全文

posted @ 2020-02-19 17:06 冲啊! 阅读(208) 评论(0) 推荐(0) 编辑

293 Node.js中模块的加载机制

摘要: ![](https://img2018.cnblogs.com/blog/1877004/202002/1877004-20200219105735336-2035597962.png) ![](https://img2018.cnblogs.com/blog/1877004/202002/1877004-20200219115220406-2071833124.png) 阅读全文

posted @ 2020-02-19 11:53 冲啊! 阅读(124) 评论(0) 推荐(0) 编辑

292 node.js 之 package.json、package-lock.json文件

摘要: package.json package lock.json文件 阅读全文

posted @ 2020-02-19 10:53 冲啊! 阅读(229) 评论(0) 推荐(0) 编辑

291 node.js第三方模块:Gulp

摘要: ![](https://img2018.cnblogs.com/blog/1877004/202002/1877004-20200219101338777-908883380.png) ![](https://img2018.cnblogs.com/blog/1877004/202002/1877004-20200219101425288-1515184673.png) ![](https://i 阅读全文

posted @ 2020-02-19 10:19 冲啊! 阅读(136) 评论(0) 推荐(0) 编辑

290 node.js第三方模块:npm,nodemon,nrm

摘要: ![](https://img2018.cnblogs.com/blog/1877004/202002/1877004-20200219100900011-1007527462.png)![](https://img2018.cnblogs.com/blog/1877004/202002/1877004-20200219100929648-974551425.png)![](https://img... 阅读全文

posted @ 2020-02-19 10:12 冲啊! 阅读(127) 评论(0) 推荐(0) 编辑

289 node.js系统模块,相对路径、绝对路径

摘要: 05.readFile.js // 1.通过模块的名字fs对模块进行引用 const fs = require('fs'); // 2.通过模块内部的readFile读取文件内容 fs.readFile('./01.helloworld.js', 'utf8', (err, doc) => { // 阅读全文

posted @ 2020-02-19 10:08 冲啊! 阅读(385) 评论(0) 推荐(0) 编辑

导航