Skip to content

Commit

Permalink
add http-server for go.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn committed Oct 25, 2012
1 parent 46c231c commit e97be08
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions template/go/base-http-server.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package main

import (
"fmt"
"net/http"
)

func main() {
http.HandleFunc("/", func (w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "hello world")
})
http.ListenAndServe(":8080", nil)
}

0 comments on commit e97be08

Please sign in to comment.