npm install express --save
npm install body-parser post请求包
// 引入body-parser模块,用来处理post请求参数
const bodyParser = require(‘body-parser’);
// 处理post请求参数
app.use(bodyParser .urlencoded({extended: false}))
app.use(bodyParser .json())
原文:https://www.cnblogs.com/zjxzhj/p/14882697.html