Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Can't capture event on client side #253

Closed
kbychkov opened this issue Feb 18, 2018 · 1 comment
Closed

Can't capture event on client side #253

kbychkov opened this issue Feb 18, 2018 · 1 comment

Comments

@kbychkov
Copy link

Hello! I experienced some problems with catching service events on the client in my app. Therefore I've made a simple feathers app to reproduce the case.

I generated a simple todos service and made client-side page using example. The client calls create method of the service and should recieve created event. Unfortunately that doesn't work.

What do I wrong?

@daffl
Copy link
Member

daffl commented Feb 18, 2018

The channels set up in a generated application by default only publish to authenticated users. You can modify this behaviour by changing https://github.com/kbychkov/feathers-events/blob/master/src/channels.js#L47 from return app.channel('authenticated'); to return app.channel('authenticated', 'anonymous'); but that should only be used for testing purposes.

This is also explained in the real-time APIs basics guide and the chat application guide.

@kbychkov kbychkov changed the title Event doesn't work on client side Can't capture event on client side Feb 19, 2018
@daffl daffl closed this as completed Feb 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants