Skip to content

Instantly share code, notes, and snippets.

View rizwhn's full-sized avatar
🪀
this is a useless feature

riz rizwhn

🪀
this is a useless feature
View GitHub Profile
@rizwhn
rizwhn / server.go
Created December 30, 2022 14:34 — forked from josue/server.go
Simple Golang HTTP server with signal capturing (ie: SIGINT/SIGTERM) & pprof debugger
/*
go build for linux:
env GOOS=linux go build -o /tmp/server server.go
run with docker:
docker run -it --rm --name test -v /tmp/server:/server -p 3000:80 -p 3001:6060 alpine /server
run pprof debugger:
go get github.com/google/pprof
pprof --seconds 30 -http=:4444 /tmp/server http://localhost:3001/debug/pprof/profile