How Can I Use Socket Io In Other Frontend Like Vue

I want to make a realtime notification system usinf frappe as a backend and vue as a frontend so, how can i do this any idea about it. @netchampfaris, @buildwithhussain, @nikkothari22 or any.

currently i am trying this code but is showing black screen.

Output : -

Hi @pithiya_Nilesh

To use socket with Frappe v14+, you would need to add in the site url (on local host this will be “localhost:9000” and the site name - this is the name of the folder in which your current site is stored (e.g: site.test).

You can see how we have initialised socketIO in frappe-React-SDK here: https://github.com/The-Commit-Company/frappe-react-sdk/blob/main/src/lib/socket.ts

Also check an example mentioned in the v15 Migration Guide: Migrating to nightly version (future v15) · frappe/frappe Wiki · GitHub

Make sure you’re using v4.7.1 of the Socket IO client library - the versions should match the Frappe server’s socket version for it to work.

1 Like

Still Not Work.

“socket.io-client”: “^4.7.1”,

  1. socket.io-client package version is same in frappe and vue3 pakage.json

  2. using site name and :9000 but is not worked i try :9001 and :9002 also.


    Screenshot from 2023-09-11 17-24-24

Output : -

Any other suggetions.

having same issue

sudo apt -y install gcc g++ make nodejs redis-server npm  

npm install -g yarn

bench setup requirements

sudo bench setup production frappe

bench restart

Use above command on bench folder.

what happen with this ?

node socket error solved with above msg command.

Ohk let me try . thanks

let me know if its worked.

It is work my 5 benches.

it gives me error , now my bench not getting start.