forked from dvajs/dva
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proxy.config.js
38 lines (33 loc) · 889 Bytes
/
proxy.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
'use strict';
module.exports = {
'/api/products': function (req, res) {
setTimeout(function() {
res.json({
success: true,
data: [
{
id: 1,
title: 'ant-tool',
description: 'New generation tool for alipay.',
vote: 65,
thumb_url: 'https://zos.alipayobjects.com/rmsportal/lKTHqeueZIDAoKd.png',
submitter: '云谦',
},
{
id: 2,
title: 'roof',
description: 'Roof 是一款基于 React 的应用框架。',
vote: 35,
thumb_url: 'https://zos.alipayobjects.com/rmsportal/IGmuncbXdWozPNe.png',
submitter: '加缪',
},
],
});
}, 600);
},
'/api/products/vote': function(req, res) {
setTimeout(function() {
res.end({success:true});
}, 600);
},
};