turned on simple http server
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user