How to use socket from non frappe app

server

frappe.publish_realtime('update_progress', {
    'progress': 42,
    'total': 100
})

client

frappe.realtime.on('update_progress', (data) => {
    console.log(data)
});

my case, I cannot use frappe.realtime.on, because I have my client app but not in frappe framework, how to communicate the frappe using the socketio?

2 Likes