UNPKG

dogstack

Version:

a popular-choice grab-bag framework for teams working on production web apps

29 lines (22 loc) 592 B
const feathers = require('feathers/client') const socketio = require('feathers-socketio/client') const hooks = require('feathers-hooks') const rx = require('feathers-reactive') const Rx = require('rxjs') const io = require('socket.io-client') module.exports = createClient function createClient (options) { const { services = [], config } = options const socket = io(config.api.url) const client = feathers() .configure(socketio(socket)) .configure(hooks()) .configure(rx(Rx)) services.map(service => { client.configure(service) }) return client }