1
0
mirror of https://github.com/imgproxy/imgproxy.git synced 2025-01-08 10:45:04 +02:00
imgproxy/main.go
2018-10-05 21:17:36 +06:00

31 lines
366 B
Go

package main
import (
"log"
"os"
"os/signal"
"net/http"
_ "net/http/pprof"
)
const version = "2.0.0"
type ctxKey string
func main() {
go func() {
log.Println(http.ListenAndServe("localhost:6060", nil))
}()
s := startServer()
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt, os.Kill)
<-stop
shutdownServer(s)
shutdownVips()
}