Creating a real-time application in laravel without nodejs

I use shared hosting in which I cannot use node js .

But I want to create a real-time application using laravel, as there https://laravel.com/docs/5.3/broadcasting doc they provide drivers, they all use node if I'm not mistaken.

I also searched for https://github.com/Askedio/laravel-ratchet that works with laravel, but that requires ZMQ , which I cannot install on my shared hosting.

What should I do any ideas.

+5
source share
1 answer

You can use Pusher and combine it with Laravel Echo. Echo is a front-end JS framework, so just include assets and you should be fine.

I think it should be said that it is probably not a good idea to develop these applications on public servers due to several reasons:

  • You almost never have access to SSH, so deploying and debugging is a huge pain.
  • You cannot install additional software that you need, such as NodeJS
  • Shared hosting servers are often not going to run heavy php applications, they are built to serve simple websites (why they are so cheap).
  • Depending on your host, all other ports except 80 and 443 are closed, so the use of external services may be blocked

In general, I believe that it’s better to just get a cheap VPS (i.e. a DigitalOcean plan worth $ 10) in which you can really do all this. Yes, it is more expensive than shared hosting, but if it is really a game changer, find a sponsor or partner. $ 120 is a piece of cake compared to the pains of using shared hosting, and this speaks of experience.

+2
source

Source: https://habr.com/ru/post/1263084/


All Articles