|
|
@ -145,7 +145,6 @@ var homePageTemplate = template.Must(template.New("homepage").Parse(homePageTemp
|
|
145
|
145
|
|
|
146
|
146
|
func runServer() {
|
|
147
|
147
|
address := fmt.Sprintf("%s:%d", *host, *port)
|
|
148
|
|
fmt.Printf("running on %s\n", address)
|
|
149
|
148
|
|
|
150
|
149
|
http.HandleFunc("/run", runCodeHandler)
|
|
151
|
150
|
http.HandleFunc("/codemirror.js", func(w http.ResponseWriter, r *http.Request) {
|
|
|
@ -156,6 +155,7 @@ func runServer() {
|
|
156
|
155
|
})
|
|
157
|
156
|
http.HandleFunc("/", homePageHandler)
|
|
158
|
157
|
|
|
|
158
|
fmt.Printf("Running on http://%s\n", address)
|
|
159
|
159
|
err := http.ListenAndServe(address, nil)
|
|
160
|
160
|
if err != nil {
|
|
161
|
161
|
log.Fatal(err)
|