----app.js
// auto-routes配置
const autoRoutes = require('express-auto-routes')(app);
autoRoutes(path.join(__dirname, './routes'));
----模型(位于route目录下)
exports.get = async function get(req, res, next) {
// const token = req.headers['t-data']
// console.log(token);
// const resData = {
// data: [],
// isSuccess: true,
// token: token || "",
// msg: "success"
// }
// res.json(resData);
contObj.sel(req, res, next);
};
06-18
638
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)