Adding server for code generation
This commit is contained in:
parent
62c6805a74
commit
40291a96dd
4 changed files with 234 additions and 0 deletions
19
server/main.go
Normal file
19
server/main.go
Normal 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")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue