Skip to content

mstnorris/fiveone-vuejs-socketio

Repository files navigation

Laravel, Vue.js and Socket.io

I have put this repo together so that others can get started easily with Laravel and Vue.js and Socket.io

  1. Clone the repo
  2. Add a .env file and add your database credentials (an example below if you're using Homestead)
DB_HOST=192.168.10.10
DB_DATABASE=fiveone-vuejs-socketio
DB_USERNAME=homestead
DB_PASSWORD=secret

BROADCAST_DRIVER=redis
  1. Run composer install/update
  2. Run npm install (might need to use sudo npm install)
  3. Migrate your database php artisan migrate
  4. Run gulp to compile the resources/assets into your public/ directories
  5. Open up two tabs within the command line and SSH into Homestead
  6. Go to your project root and in the first one run redis server --port 3001
  7. In the second run node socket.io
  8. I think you should be ready to test in the browser
  9. /guestbook to sign the guestbook (Vue.js)
  10. /fire and /test to, well, fire and event and test that you can see it. (All the while you can see the output in the command line)

To do

  1. Integrate Vue.js and Socket.io so notifications are sent to logged in users when there is a new post.
  2. Install supervisord or similer to keep socket alive.

About

Laravel 5.1 with Vue.js and Socket.io integration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published