-
Notifications
You must be signed in to change notification settings - Fork 2
Description
I am sorry, my English is very poor, but still love you this project. I am in the help of Google translation, and strive to establish communication with you. I am currently using this project and intend to recommend more people to use it. Here are my suggestions:
`
const { apiServer } = {
url: 'http://x.x.x.x/api',
mockUrl: 'http://x.x.x.x/api' // API services created using json-server
}
const API = createAPI(resources, middleware, API_URL, fetchOptions);
.....
const user ={
user: {
namespace: 'users/',
mock: true, // hope to add a 'mock' attribute here,
methods: {
get: ( ) => ({ path: '' }),
add: (data) => ({path:''},{options:{
method:'POST',
body:JSON.stringify(data),
}}),
}
}
}
export default user
`
readme:
mock = true: Connecting real API resources
mock = false: Connecting mock API resources
benefit:
This advantage is obvious, can help developers in the debugging process, more efficient