make web server port configurable

pull/3/head
Martin Thielecke 3 years ago
parent 8a0cd98b53
commit 5fd272f207
Signed by: mthie
GPG Key ID: D1D25A85C8604DFB

@ -8,7 +8,7 @@ Move settings.yml.dist to settings.yml and set the Params
Create app in Twitch Dev Console
https://dev.twitch.tv/console/apps
Set http://localhost:8083/callback as OAuth Redirect URL
Set http://localhost:8080/callback as OAuth Redirect URL (change the port to your setting in the settings.yml)
Copy Client-ID and Secret to settings.yml

@ -39,7 +39,7 @@ func main() {
}()
log.Info("Starting webserver...")
log.Fatal(http.ListenAndServe(":8083", mux))
log.Fatal(http.ListenAndServe(":"+settings.WebserverPort, mux))
}
func handleSaves() {

@ -20,6 +20,7 @@ type Settings struct {
ClientID string `yaml:"client_id"`
ClientSecret string `yaml:"client_secret"`
VerificationToken string `yaml:"verification_token"`
WebserverPort string `yaml:"webserver_port"`
}
func loadSettings() {

@ -1,3 +1,4 @@
client_id: "your twitch client id"
client_secret: "your twitch client secret"
verification_token: "a random string!"
webserver_port: 8080

Loading…
Cancel
Save