Skip to content

Realtime Chat and Notification powered by Laravel, MySQL, Redis, Laravel Echo, Socket.io

License

Notifications You must be signed in to change notification settings

cuongdinhngo/realtime_chat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REALTIME CHAT & NOTIFICATION: LARAVEL, MySQL, REDIS, LARAVEL ECHO, SOCKET.IO Client

You can read more about my project to understand the process of broadcasting with Redis, Laravel Echo Server, Socket.IO Client via my LinkedIn

  1. Go to echo-docker folder to start containers
  2. Run command: docker-composer up -d at echo-docker
  3. Check running dockers: docker ps
  4. Get IPAddresss of chat_db and chat_redis containers: docker inspect chat_redis | grep IPAddress
  5. Make .env file: cp .env.example .env
  6. Update .env file at socket_app folder
DB_CONNECTION=mysql
DB_HOST=chat_db
DB_PORT=3306
DB_DATABASE=chat_app
DB_USERNAME=root
DB_PASSWORD=root@secret123

BROADCAST_DRIVER=redis
CACHE_DRIVER=file
QUEUE_CONNECTION=redis
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=chat_redis
REDIS_PASSWORD=null
REDIS_PORT=6379
REDIS_CLIENT=predis
REDIS_PREFIX=""
  1. Configure project as below commands:
docker exec -it app_server bash
composer install
npm install
npm run dev
php artisan key:generate
php artisan migrate
php artisan queue:work
  1. Open other terminal to run this commmand:
npm install -g laravel-echo-server
laravel-echo-server start
  1. Start chat project http://localhost:8000

About

Realtime Chat and Notification powered by Laravel, MySQL, Redis, Laravel Echo, Socket.io

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages