the express service is configured locally, and the get request is fine, but the data cannot be obtained when the post request is made. Req.body is always undefined. The corresponding body-parser is also configured, but it doesn"t work
const app = express();
const apiRoutes = express.Router();
const bodyParser = require("body-parser");
app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: true }));
app.use("/", apiRoutes);
before (app) {
app.post("/post", (req, res) => {
console.log(req.body)
})
}