1.使用express创建web服务器
//先安装express
//npm install express --save
//1.引入express
const express = require('express');
//2.创建web服务器实例
const app = express();
//3.监听服务器
app.listen(80,function (){
console.log('server running at http://127.0.0.1:8080')
})
2.express监听get请求
3.express监听post请求
4.express通过send()响应给客户端内容
5.获取url中携带的查询参数
6.获取url中的动态参数
7.express.static()
8.挂载路径前缀