Frontend to Backend Communication Between Go and JavaScript
Very simple and clean example
Published in
7 min readDec 27, 2020
- part: creating the service
- part: improving the service
- part: upgrade for web
- part: adding SSE
- part: simple javascript frontend functionality
- part: you are reading it right now
- part: server-side logging
- part: run it all in docker
- part: adding database container
- part: database — service communication
Addition 1: functions, methods, pointers and interfaces
Addition 2: websocket communication
Addition 3: socket communication
Is it hard to program a communication between frontend and backend?
I can only answer in case of Go and vanilla Javascript. And in this case the answer is: it is as easy as riding a bike.
If you want to be convinced, keep reading. In few minutes you will see and understand that you can do it by yourself. You will send data from webpage to server and back, without even refreshing the page itself.