0.1.0 • Published 7 years ago

eleme-mock-server v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
7 years ago

Eleme Mock Server

The offical javascript sdk, based on the awesome axios.

Usage

npm i eleme-mock-server --save

then import in your project, Mock(cluster, config) will return an axios instance, checkout the methods here.

  • cluster String: your project's mock cluster.
  • config Object: axios config, see the details here.
import Mock from 'eleme-mock-server';

Mock('your-mock-cluster', {
  baseURL: 'https://some-domain.com/api/'
}).get('/user/e1emeb0t').then(result => {

}).catch(error => {

});
0.1.0

7 years ago