Skip to content

Instantly share code, notes, and snippets.

@Mattchewone
Created June 15, 2018 09:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Mattchewone/fa4152f6e8240dfcdd2a04d4b6905d2b to your computer and use it in GitHub Desktop.
Save Mattchewone/fa4152f6e8240dfcdd2a04d4b6905d2b to your computer and use it in GitHub Desktop.
import feathers from '@feathersjs/feathers'
import socketio from '@feathersjs/socketio-client'
import auth from '@feathersjs/authentication-client'
import io from 'socket.io-client'
export const host = process.env.API_HOST || 'http://localhost:3030'
const socket = io(host, { transports: ['websocket'] })
const feathersClient = feathers()
.configure(socketio(socket))
.configure(auth({ storage: window.localStorage }))
export default feathersClient
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment