

Ask HN: Node.js with PHP application? - ecstasy

So the application that I am currently working on has a backend written on PHP (CodeIgniter) and MySQL. I am using AngularJS with Yeoman Angular Generator for frontend. It&#x27;s basically a SPA. The backend is written to serve as REST api with multiple endpoints. I want you guys to give feedback on my tech stack choice. Thanks in advance. (the application is yet to be deployed)<p>I want to develop a dashboard for this application in which I want it to update realtime. I was wondering if Node.js with socket.io is a good choice. I would also want to know how to integrate it with my PHP and MySQL backend?
======
mattkrea
As much as I'd love to say "rewrite all the PHP in Node too" :-) yes, your
description will work. After a few years in production it seems to me that
Node's best position is right between the browser and the backend. Translating
legacy APIs into modern, easy-to-use services.

In your case you might want to add some web hooks for the PHP application to
let your Node layer know that things have happened which you can then send
over Socket.IO. There may be a more efficient way to do this by tapping into
the database directly though I don't tend to like going that route usually but
that may just be preference.

~~~
mailanik
Yah even I was thinking to re-write the application but again I will
definitely affect my release time.

