Understanding live website input/output

I’ve went through portions of several courses on golang and understand the basics of the language. But I can go through all the coding and it’s great until I need to deploy it to a live site which seems to be an entirely different ballgame. Is there a simple example somewhere that shows exactly how to deploy a simple app to google cloud that gets user input and returns the results to a live web page?
Also, It’s fairly easy to use the terminal and run a program in golang to produce output in the terminal but that’s apparently way different that displaying the same thing to a live website?

For your first run I suggest you to use heroku free dyno. Heroku is a PaaS that keep you focus on your code.
Follow theirs guide https://devcenter.heroku.com/articles/getting-started-with-go#introduction

My problem isn’t with deploying. I was able to do the hello world deploy with google cloud. My problem is understand how to do something useful, i.e. receive user input and update a web page as a result. If all I wanted to do was put something on a web page I would just use HTML.

You have to use websocket!

This links show how to achieve this in webpage or terminal:

And this is a simplified example of using websocket in golang:

https://gowebexamples.com/websockets/

Thanks, I’ll take a look

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.