actual hostname
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
milkwatch-server
|
||||
5
main.go
5
main.go
@@ -13,6 +13,8 @@ import (
|
||||
const yourDomain string = "sandbox403bedf0d09d4e539131fabf0ab7c11f.mailgun.org" // e.g. mg.yourcompany.com
|
||||
const privateAPIKey string = "key-2b58bc1193c549df83d8d5ed54e1c982"
|
||||
|
||||
const host = "rodberrypi"
|
||||
|
||||
func main() {
|
||||
for {
|
||||
log.Println("Checking Fridge")
|
||||
@@ -27,8 +29,7 @@ func main() {
|
||||
}
|
||||
|
||||
func endPointAlive() bool {
|
||||
|
||||
res, err := http.Get("http://localhost:2122/heartbeat")
|
||||
res, err := http.Get("http://"+host+":2122/heartbeat")
|
||||
if err != nil {
|
||||
log.Println(err)
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user