-
-
Notifications
You must be signed in to change notification settings - Fork 751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feathers-dove] using the createClient function #2713
Comments
A working example can be found at https://github.com/feathersjs/feathers-chat/blob/dove/react-chat/src/feathers.ts - I will also add it to the CLI guide at https://dove.feathersjs.com/guides/cli/index.html shortly. Note that there was a bug on how the client is generated which will be fixed in the next prerelease ( |
Ok, so I tried import io from 'socket.io-client';
import socketio from '@feathersjs/socketio-client';
import authentication from '@feathersjs/authentication-client';
import { createClient } from './client';
const connection = socketio(io('http://localhost:3030'));
const client = createClient(connection);
client.configure(authentication() as any); |
I just published v5.0.0-pre.28 with a bunch of fixes around this. Would you mind installing it and trying this with a newly generated app? |
My bad: I forgot to use I now installed all packages from pre.28 and it works. Thank you very much! |
A newly generated app will have a
client.ts
file:I'm completely at loss on how to use
createClient
to obtain a REST or SocketIO client. The documentation on the client contains examples likeBut trying to use this with
createClient(socketio(socket))
won't work since the methos expects aTransportConnection<ServiceTypes>
. I don't even understand what this type represents (the type definition is not very enlightening).Some examples would be greatly appreciated.
The text was updated successfully, but these errors were encountered: