How to call the controller when I do emit in socket.io
I want that when calling emit from the client the data is first saved in the db and then sent to it.
My code