I am working on an app integrated with REST API developed in golang, I have used gin framework and deployed api on aws ec2 instance.
What I do to run the api is as follows
1.Upload all files in src directory
2.Go get and go install brbapi ( brbapi is package/folder name )
3.start tmux and run “brbapi” ( using tmux to keep api running )
this start the service and I can use the rest api , but sometime ( once in a day ) the services stops unexpectedly without any error or log
Are there any ways to keep it alive and add some logging methods to get the failure logs ?