Skip to content

Instantly share code, notes, and snippets.

@indatawetrust
Created October 29, 2020 17:14
Show Gist options
  • Save indatawetrust/f118b92aaff271853a0c6acebc44ea7f to your computer and use it in GitHub Desktop.
Save indatawetrust/f118b92aaff271853a0c6acebc44ea7f to your computer and use it in GitHub Desktop.
import io from 'socket.io-client';
import feathers from '@feathersjs/feathers';
import socketio from '@feathersjs/socketio-client';
import auth from '@feathersjs/authentication-client';
const URL = 'http://localhost:3030';
const socket = io(URL);
const feathersClient = feathers()
.configure(socketio(socket))
.configure(auth({
storage: window.localStorage
}));
export default feathersClient;
@indatawetrust
Copy link
Author

indatawetrust commented Dec 12, 2020

npm i @feathersjs/feathers @feathersjs/socketio-client socket.io-client@2 @feathersjs/authentication-client -S

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment