Answer the question
In order to leave comments, you need to log in
Socket.io, nodejs and mysql how to organize a chat connection?
Node.js + socket.io and mysql how to organize a connection?
I need to make a chat, for this I decided to use a bunch of node.js + socket.io and mysql.
As a database, the choice fell on mysql, because it is used for the site on which the chat will hang. Both node.js and php scripts of the site will work with the tables that will be used for the chat. The site is made on YII freameworke
The question follows from here.
How to organize a connection to the database in node.js, i.e. connect only once and work with the database through this connection or make a connection for each request from the client, perform tedious actions with the database and break the connection.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question