Skip to content

Call to Service Create not Broadcasting #2517

Answered by daffl
EricKulchycki asked this question in Q&A
Discussion options

You must be logged in to vote

Events will only be broadcast to connections that have been registered with a channel with the simplest example shown in the API server quick start. In a generated application the standard behaviour is that events are only published to users that are authenticated. More details and links can be found in the channels.js file.

Additionally your client side code example probably won't work. It should be app.service() not socket.service() and .on('created') not .on('create'):

const socket = io(url);
const app = feathers();

// Set up Socket.io client with the socket
app.configure(socketio(socket));
...
app.service("readings").on("created", (payload) => {
  console.log({ message: "Readings Cre…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@EricKulchycki
Comment options

Answer selected by EricKulchycki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants