📜  express req get json - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:18.982000             🧑  作者: Mango

代码示例1
const express = require('express');
const app = express();

app.use(express.json());

app.post('*', (req, res) => {
  req.body;    // The json object sent to the server
});
const port = 3000;
app.listen(port, () => console.log(`Listening on port ${port}.`));