/gogateway

gateway to handle dispatched servers

Primary LanguageGo

gogateway

what

a personal gateway to handle dispatched servers.

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.

install / run

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

prep

sudo apt update
sudo apt upgrade
sudo apt install golang
git clone https://github.com/aboulaboul/gogateway

cert ssh

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

routes

edit routes :
nano ./gogateway/routes.json

run

go run ./gogateway/main.go