Skip to content

Commit 97893d7

Browse files
author
Philipp Neumann
committed
Conf now also holds the hostname/ip adress to listen to
1 parent d6b187b commit 97893d7

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

cmd/wheretoeat/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,5 @@ func main() {
2525
venue.SetDataFolder("data")
2626
web.SetWeights(c.Weight)
2727
r := web.SetupRouters("/")
28-
log.Fatal(http.ListenAndServe(":"+strconv.Itoa(c.Port), r))
28+
log.Fatal(http.ListenAndServe(c.Host+":"+strconv.Itoa(c.Port), r))
2929
}

pkg/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
//Config is the struct to save and load the config file
1010
type Config struct {
1111
GoogleAPIKey string `json:"googleapikey"`
12+
Host string `json:"host"`
1213
Port int `json:"port"`
1314
Weight Weight `json:"weight"`
1415
}

0 commit comments

Comments
 (0)