UNPKG

@hookcompany/feathers-client-custom-methods

Version:

️🏹 Create feathers service on client with custom methods names.

19 lines (14 loc) 492 B
import feathers from '@feathersjs/feathers'; import feathersRestClient from '@feathersjs/rest-client'; import axios from 'axios'; import feathersCustomMethods from '../dist'; const HTTP_URI = 'http://192.168.100.6:4000/mobile'; const rest = feathers() .configure(feathersRestClient(HTTP_URI).axios(axios)); feathersCustomMethods.bootstrap(rest) .then(Feathers => { const Feeds = Feathers.service('feeds'); Feeds.foo() .then(console.log) .catch(console.log); });