cd example
npm install
cd ..
cd LB
go tidy
cd ..
cd example
export PORT=3000
node index.js
export PORT=3001
node index.js
cd LB
export TARGET_URLS=http://localhost:3000,http://localhost:3001
cd cmd/lb
go run .
Send a request to the LB (http://localhost:3002) You can check the logs of the example servers to see the requests being routed to the different servers
docker pull lukamacharashvili/my-load-balancer:latest
docker run --network="host" -e TARGET_URLS=http://localhost:3000,http://localhost:3001 lukamacharashvili/my-load-balancer:latest
Send a request to the LB (http://localhost:3002) You can check the logs of the example servers to see the requests being routed to the different servers