Answer the question
In order to leave comments, you need to log in
How to properly deploy a Go application to a server?
Hello.
Wrote a small web service. Now you need to deploy to the server and run.
I can't find information online on how to do this.
Answer the question
In order to leave comments, you need to log in
You have a pointless question. After all, it depends on what is on the server.
If you are using Google AppEngine for Go, then this is done, for example:
https://cloud.google.com/appengine/docs/go/quickstart
In the Cloud Platform Console, go to the Projects page and select or create a new project.
Go to the Projects page
Note the project ID that you created above.
Upload your application to Google App Engine by invoking the following command. This opens a browser window for you to sign in using your Google account. You'll be providing the project ID as the argument for -A. Use the -V argument to specify a version name.
appcfg.py -A -V v1 update myapp/
Your app is now deployed and ready to serve traffic athttp://appspot.com/.
Well, in general, a Go program is ultimately an ordinary binary.
Upload it to the server in
any way. Run it on the server in any way.
This is a full-fledged binary file, which for execution is one of the advantages of Go's design.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question