mirror of
https://github.com/doocs/md.git
synced 2024-11-28 13:36:32 +08:00
1f5434fa07
* feat: Custom upload logic * doc: update readme * Update README.md
28 lines
584 B
JavaScript
28 lines
584 B
JavaScript
/**
|
|
* 配置说明请参考文档:
|
|
* https://hongqiye.com/doc/mockm/config/option.html
|
|
* @type {import('mockm/@types/config').Config}
|
|
*/
|
|
module.exports = (util) => {
|
|
return {
|
|
api: {
|
|
'/upload'(req, res) {
|
|
res.json({
|
|
msg: `上传成功`,
|
|
url: util.libObj.mockjs.mock(`@image`),
|
|
})
|
|
},
|
|
},
|
|
static: [
|
|
{ // 测试 netlify 部署
|
|
fileDir: `./dist`,
|
|
path: `/`,
|
|
},
|
|
{ // 测试 gitee/github 部署
|
|
fileDir: `./dist`,
|
|
path: `/md`,
|
|
},
|
|
],
|
|
}
|
|
}
|