summaryrefslogtreecommitdiff
path: root/app/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/main.go')
-rw-r--r--app/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/main.go b/app/main.go
index 35a162a..72be13c 100644
--- a/app/main.go
+++ b/app/main.go
@@ -6,6 +6,7 @@ import (
"github.com/robfig/cron"
"html/template"
"net/http"
+ "os"
)
var decoder = schema.NewDecoder()
@@ -17,6 +18,7 @@ var c = cron.New()
func main() {
run()
InitDB()
+ insertHost()
r := mux.NewRouter()
r.HandleFunc("/", IndexHandler)
@@ -28,5 +30,7 @@ func main() {
r.HandleFunc("/new", PrintNewJobHandler).Methods("GET")
r.HandleFunc("/jobs", ShowJobHandler)
http.Handle("/", r)
- http.ListenAndServe(":8080", nil)
+ ip := os.Getenv("STATUS_HTTP_IP")
+ port := os.Getenv("STATUS_HTTP_PORT")
+ http.ListenAndServe(ip+":"+port, nil)
}