Adding server for code generation

This commit is contained in:
Francesc Campoy 2015-02-04 13:30:07 +00:00
parent 62c6805a74
commit 40291a96dd
4 changed files with 234 additions and 0 deletions

19
server/main.go Normal file
View file

@ -0,0 +1,19 @@
// +build !appengine
package main
import (
"flag"
"net/http"
)
func main() {
port := flag.String("http", "127.0.0.1:8080", "ip and port to listen to")
flag.Parse()
http.HandleFunc("/", homeHandler)
http.ListenAndServe(*port, nil)
}
func homeHandler(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, "static/home.html")
}