Answer the question
In order to leave comments, you need to log in
How to pass a command from PHP to NodeJS and vice versa?
Background
Previously, the site used only PHP and all requests went through Ajax. Now NodeJS for WebSockets (socket.io) has been added.
Question
How to transfer data array from PHP to NodeJS?
On the example of a chat: on some events, the server sends a message to the chat to the user (adds an entry to the database), at this moment you need to send this message to the user from NodeJS.
Answer the question
In order to leave comments, you need to log in
You need a data bus. Arm yourself with message queues (ZeroMQ, RabbitMQ, ActiveMQ, etc.)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question