cd /tmp && wget https://go.dev/dl/go1.22.2.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
cd && nano .bashrc
export PATH=$PATH:/usr/local/go/bin
source .bashrc
git clone https://github.com/tharaka911/nawwa-go-redis-api.git
go run main.go
go build main.go
nano /lib/systemd/system/nawwa-go-redis-api.service
[Unit]
Description=nawwa-go-redis-api
[Service]
Type=simple
Restart=always
RestartSec=5s
ExecStart=<executable location>/main
WorkingDirectory=<executable location>
[Install]
WantedBy=multi-user.target
journalctl -xeu nawwa-go-redis-api
journalctl -xeu nawwa-go-redis-api -f
service nawwa-go-redis-api start
service nawwa-go-redis-api status
service nawwa-go-redis-api stop