Skip to content

Commit

Permalink
chore: launch pprof server in build mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillich committed Apr 4, 2024
1 parent 83127df commit 2c6bae6
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ package main

import (
"log"
"os"

"github.com/getseabird/seabird/internal/ui"

"net/http"
_ "net/http/pprof"
)

var (
Expand All @@ -13,6 +17,12 @@ var (
)

func main() {
if os.Getenv("SEABIRD_DEV") == "1" {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
}

ui.Version = version
app, err := ui.NewApplication(version)
if err != nil {
Expand Down

0 comments on commit 2c6bae6

Please sign in to comment.