I have a NodeJS application that needs to communicate with PHP Laravel application, both are hosted on the same server.
Normally, I'd send HTTP request from NodeJS to an endpoint in Laravel, but due to firewall / security settings on the server, it cannot be done and it needs to send request via Unix Domain Sockets, which isn't a subject that I'm too familiar with.
The current idea is:
- NodeJS would, instead of sending POST request to an endpoint, send a POST request to a specified path to a file.
- Our Laravel application would keep 'watching' the file, when the file changes, execute a function and send back response to that file.
I've been reading on Queue, Jobs, and Task Scheduling on Laravel docs, but it is still confusing how to set up a forever running "Job" to listen to the requests coming from Node.
What would be the best way to go about this setup? Can anyone point me into the right direction?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2i6Xxnj
via IFTTT
Aucun commentaire:
Enregistrer un commentaire