feathersjs-ecosystem / feathers-sync

Synchronize service events between Feathers application instances
MIT License
221 stars 41 forks source link

receive events in an app from another app #105

Closed apmcodes closed 5 years ago

apmcodes commented 5 years ago

Using feather-sync, Is it possible to receive events in an app (instead of a client) from another app. Or only clients can listen to events from apps.

Tried the below which doesn't work (remember seeing something similar somewhere but not able to find now) ,

App1 has Uploads service

app.use('uploads',...)
...
app.create(...

App2, Event receiving app

    app.on('uploads/created', (data) => {
        logger.info('data', data);
    })

Use case: When a service created event happens in App1, then app2, (app3 ...) needs to run a local service created call.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Apologies if the issue could not be resolved. FeathersJS ecosystem modules are community maintained so there may be a chance that there isn't anybody available to address the issue at the moment. For other ways to get help see here.

apmcodes commented 5 years ago

Fixed by

        app.service('job').on('created', data => {
            console.log('data %o', data);
        })