摘要:
const http = require('http'); const url = require('url'); const path = require('path'); const fs = require('fs'); const mime = require('mime'); const app = http.createServer(); console.log(global._...
阅读全文
posted @ 2019-07-25 23:37
毛不易的小老婆
阅读(266)
推荐(0)
编辑
摘要:
const https = require('http')//引入系统模块HTTP const app = https.createServer();//创建网站服务器 const url = require('url') // 为网站服务器对象添加请求事件 app.on('request',(req,res) => { // 获取请求方式 为了判断方便并使用toLowerCase()...
阅读全文
posted @ 2019-07-25 21:54
毛不易的小老婆
阅读(188)
推荐(0)
编辑
摘要:
// 创建web服务器 //引用系统模块 const http = require('http') //用于创建网站服务器的模块 //创建web服务器 const app = http.createServer(); //app就是网站服务器对象 //当客户端发送请求时 app.on('request', (req, res) => { // 获取输出请求方式 console...
阅读全文
posted @ 2019-07-25 20:15
毛不易的小老婆
阅读(187)
推荐(0)
编辑