skip to Main Content

Hello I’ve got a question, beacause I still don’t understand that topic well and I’m beginner in that, I want to build web application where will be included realtime chat.For websockets I want to use Laravel Reverb. If I’ll want host that app somwhere on web-hosting, will be node.js server needed for that(for using websockets) ? I mean, if webhosting, where I will host web app, must have support for node.js server?

2

Answers


  1. No, you don’t need any support for Node.js to run the Laravel Reverb package since this package is built entirely on PHP and Laravel components.

    Of course, you can still build a chat application where your WebSocket server is written in Node.js, but in the case of Laravel Reverb, you don’t need Node.js at all for the realtime part.

    Login or Signup to reply.
  2. No, you don’t

    As laravel reverb is first party application which can be run through artisan command with debug flag

    Debug to view logs & staus while development

    php artisan reverb:start --debug 
    

    In production – Linux Ubuntu

    Supervisor can be used to execute this reverb application without causing any system blocks.

    Check this reference for supervisor
    How to use supervisor to process jobs in Laravel?

    Supervisor Laravel Reverb Conf

    1. Install & Add new supervisor configuration

    sudo apt-get install supervisor

    nano /etc/supervisor/conf.d/laravel-reverb.conf

    1. laravel-reverb.conf add this command in file

    enter image description here

    1. Reread & Start laravel reverb
    sudo supervisorctl reread 
    
    sudo supervisorctl update  
    
    sudo supervisorctl start laravel-reverb:*
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search