A javascript client for notify_push events for Nextcloud apps.
npm i @nextcloud/notify_push
import { listen } from '@nextcloud/notify_push'
// Using pre_auth request for web apps
listen('notify_file', () => {
console.log('A File has been changed')
})
// Using credentials for clients
listen('notify_file', () => {
console.log('A File has been changed')
}, {
credentials: {
username: 'alice',
password: 'app-password',
},
})