Create Go service the easy way
For Windows, Linux, MacOS and Docker
Published in
5 min readDec 17, 2020
- part: you are reading it right now
- part: improving the service
- part: upgrade for web
- part: adding SSE
- part: simple javascript frontend functionality
- part: frontend — backend communication
- 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
Why would you want to create a service?
With Go programming language you can use the final executable the same way on Windows, Linux and MacOS (by generating proper executable). But you cannot install this executable as a service using standard system tools like sc.exe
, systemd
or launchd
. By using this approach you will know, how to make your software executable installable with those system tools and make it run as a service, when system starts.