I'm rusty on Go but I need a gateway to dispatch incoming requests from the web to micro services and http servers that run on different Raspberry Pi.
I'm using dynDNS to route my domain to my box and then I want to handle the dispatching with this gateway project.
assuming :
- we're on Raspberry Pi OS (previously called Raspbian, in other words debian)
- we're not using docker, we keep everything as simple as possible
sudo apt update
sudo apt upgrade
sudo apt install golang
git clone https://github.com/aboulaboul/gogateway
sudo apt install certbot
sudo certbot certonly --standalone
as a result :
Certificate is saved at: /etc/letsencrypt/live/your_domain_name/fullchain.pem
Key is saved at: /etc/letsencrypt/live/your_domain_name/privkey.pem
copying to project directory
sudo cp /etc/letsencrypt/live/your_domain_name/fullchain.pem ./gogateway/server.crt
sudo cp /etc/letsencrypt/live/your_domain_name/privkey.pem ./gogateway/server.key
sudo chmod 644 ./gogateway/server.key
edit routes :
nano ./gogateway/routes.json
go run ./gogateway/main.go