added initial go file
This commit is contained in:
parent
659251e87d
commit
aff09ed2a1
22
main.go
Normal file
22
main.go
Normal file
@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"github.com/gorilla/sessions"
|
||||
"log"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var addr = flag.String("addr", ":8000", "address I'll listen on.")
|
||||
var static_files = flag.String("static", "./static", "location of static files")
|
||||
|
||||
var store = sessions.NewCookieStore([]byte("hello world"))
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
http.Handle("/",
|
||||
http.FileServer(http.Dir(*static_files)))
|
||||
if err := http.ListenAndServe(*addr, nil); err != nil {
|
||||
log.Fatal("ListenAndServe:", err)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user