This guide covers installing GoVisual for your Go web applications.
- Go 1.19 or higher
- (Optional) PostgreSQL for persistent storage backend
- (Optional) Redis for high-performance storage backend
- (Optional) OpenTelemetry collector for telemetry data export
The simplest way to install GoVisual is via Go modules:
go get github.com/doganarif/govisualYou can also manually clone the repository:
git clone https://github.com/doganarif/govisual.git
cd govisual
go installCreate a simple test application to verify that GoVisual is working correctly:
package main
import (
"fmt"
"net/http"
"github.com/doganarif/govisual"
)
func main() {
mux := http.NewServeMux()
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello, GoVisual!")
})
// Wrap with GoVisual
handler := govisual.Wrap(mux)
fmt.Println("Server starting at http://localhost:8080")
fmt.Println("GoVisual dashboard available at http://localhost:8080/__viz")
http.ListenAndServe(":8080", handler)
}If everything is working correctly, you should be able to:
- Access your application at http://localhost:8080/
- See the GoVisual dashboard at http://localhost:8080/\_\_viz
Once GoVisual is installed, check out the Quick Start Guide to learn how to use it in your application.