turned on simple http server

This commit is contained in:
sm
2013-12-20 23:11:01 -08:00
parent a8e03e721e
commit 3d873f48f1
2 changed files with 47 additions and 0 deletions
+9
View File
@@ -1,8 +1,10 @@
package main
import (
"fmt"
"github.com/kelseyhightower/envconfig"
"log"
"net/http"
)
func main() {
@@ -16,4 +18,11 @@ func main() {
log.Fatal(err)
}
log.Printf("%+v", config)
http.Handle("/api/v0/info/", JsonHandler(apiInfo))
err = http.ListenAndServe(fmt.Sprintf(":%d", config.Port), nil)
if err != nil {
log.Fatal(err)
}
}