make web server port configurable
This commit is contained in:
parent
8a0cd98b53
commit
5fd272f207
|
@ -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
|
||||
|
||||
|
|
2
main.go
2
main.go
|
@ -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
|
||||
|
|
Reference in New Issue