mirror of
https://github.com/willnorris/imageproxy.git
synced 2026-04-27 22:06:24 +02:00
add initial (pretty naive) server implementation
This commit is contained in:
parent
e61fba8787
commit
11441a107a
2 changed files with 61 additions and 0 deletions
20
imageproxy.go
Normal file
20
imageproxy.go
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue