mirror of
https://github.com/imgproxy/imgproxy.git
synced 2024-11-24 08:12:38 +02:00
22 lines
395 B
Go
22 lines
395 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
func main() {
|
|
s := &http.Server{
|
|
Addr: conf.Bind,
|
|
Handler: httpHandler{},
|
|
ReadTimeout: time.Duration(conf.ReadTimeout) * time.Second,
|
|
WriteTimeout: time.Duration(conf.WriteTimeout) * time.Second,
|
|
MaxHeaderBytes: 1 << 20,
|
|
}
|
|
|
|
log.Printf("Starting server at %s\n", conf.Bind)
|
|
|
|
log.Fatal(s.ListenAndServe())
|
|
}
|