Integrate can-connect with the FeathersJS Client
Both of the included behaviors require a Feathers Client instance. Here is a basic setup:
// models/feathers.js import feathers from "@feathersjs/client"; import socketio from "@feathersjs/socketio-client"; import io from "socket.io-client/dist/socket.io"; import auth from "@feathersjs/authentication-client"; const socket = io( "http://example.com" ); const client = feathers() .configure( socketio( socket ) ) .configure( auth() ); export default client;
Pro tip: If you are planning on using Done-SSR, exchange the
socket.io-client/dist/socket.iomodule for steal-socket.io in the above example.