How to write a dashboard in Golang

Your aplication is something between a clasic one and a SPA. I will summarize the steps i think you need to release your project:

  • Write a server for your application. A simple http listener, some handlers, authenticaton, take care about sessions, maybe a middleware :thinking:, add a file server (important :point_up:), eventually use gorilla/mux) for routing.
  • Write some nested templates (in Go) to show the frontend. Here probably you need a login page and a dashboard template (bootstrap or whatever). Tip: Be careful at template delimiters when you work with frontend frameworks!
  • Write some api endpoints in backend to access the data (http handlers).
  • Query the endpoints periodically and update the frontend (you can use Angular $http directive to do this easy but is not mandatory, use whatever you know better).
1 Like