Publisher => https://github.com/Brotherbond/maxibuy.co
Subscriber => https://github.com/Brotherbond/websocket
Postman API => https://documenter.getpostman.com/view/14901487/VUxKVAUq
NB: The Subscriber repo is added as a submodule to this, link above.
NB: pusher app key & secret in .env file could be any random value and doesn't link to my live account
Both servers are laravel based. copies of the subscriber server can used for multiple tests
cp -r subscriber subscriber2
-
git clone the repos
-
cp .env.docker to .env => rename the .env.docker file for each server
-
set APP_PORT, VITE_PORT, DOCKER_APP_URL and FORWARD_ values in the .env file for new server in case of multiple system
Optional if switching user to sail to work in container environment, add WWWUSER and WWWGROUP. NB default is set as root
su - sail
cd /var/www/html
php artisan queue:work
npm run dev
php artisan queue:work
npm run dev
php artisan websockets:serve
composer install && npm run dev && ./vendor/bin/sail up -d
php artisan queue:work
php artisan websockets:serve
pnpm i && pnpm run dev # NB pnpm is used here just like npm or yarn
./vendor/bin/sail down
php artisan tinker
event (new \App\Events\NewTrade('new'))