mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-27 13:56:25 +02:00
21 lines
284 B
Go
21 lines
284 B
Go
|
|
package main
|
||
|
|
|
||
|
|
import (
|
||
|
|
"log"
|
||
|
|
"net/http"
|
||
|
|
|
||
|
|
"github.com/willnorris/go-imageproxy/proxy"
|
||
|
|
)
|
||
|
|
|
||
|
|
func main() {
|
||
|
|
p := proxy.NewProxy(nil)
|
||
|
|
server := &http.Server{
|
||
|
|
Addr: ":8080",
|
||
|
|
Handler: p,
|
||
|
|
}
|
||
|
|
err := server.ListenAndServe()
|
||
|
|
if err != nil {
|
||
|
|
log.Fatal("ListenAndServe: ", err)
|
||
|
|
}
|
||
|
|
}
|