user6945506 user6945506 - 1 month ago 19
Javascript Question

run node.js server for chat app in e-commerce website

I want to add a chat app to my e-commerce website which offers one-to-one chat between the buyers and the sellers. After searching ,web sockets seems to be right for this but it requires node.js server and the rest of my website is in php with apache server.
I have read that it is not good to run both apache and node server at the same time. For video chat I'm using appear.in's javascript api which has no such limitations.

How can I run the node.js app under this scenario?

Answer

There are plenty of web socket libraries for PHP, e.g. Ratchet.

If this is the only reason for you to move parts of you application to Node.js, you shouldn't necessarily do it.

Comments