Go application run in production

Viewed 2682

I have a production server with ssh root access. There I have installed go and have cloned my project, I am working with putty to run my application but after closing putty my go application stops working, what I need to do to get always running go application?

Here is my go.service file

[Unit]
Description=my amazing service

[Service]
Restart=always
RestartSec=3
ExecStart=go run /root/work/src/main/main.go

[Install]
WantedBy=multi-user.target
3 Answers
Related