Impliment StartupTesting and started OAuth Server

Testing for IRC & Channels connection for debugging
OAuth Server (because it's better to roll my own for this)
internal/auth/oauth.go
tests/startup_checks.go

More tests to come for debugging

Plan to impliment Logging in internal/stoage/logs for internal & UI
debugging
This commit is contained in:
bryce
2025-07-08 19:46:24 +12:00
parent eab6bee098
commit d6c77a3c93
3 changed files with 111 additions and 4 deletions

View File

@@ -4,6 +4,7 @@ import (
"log"
"os"
"streambot_twitch/internal/auth"
"streambot_twitch/internal/chat"
"streambot_twitch/internal/commands"
twitchapi "streambot_twitch/internal/twitchapi"
@@ -12,11 +13,19 @@ import (
)
func main() {
go func() {
if err := oauth.StartOAuthServer(":8080"); err != nil {
log.Fatalf("OAuth server error: %v", err)
}
}()
log.Println("OAuth server started on port 8080")
botUsername := os.Getenv("nz_chatterbot")
botOAuth :+ os.Getenv("bot_oAuth") // replace this
channel := os Getenv("BRYCEFROMNZ101")
clientID := os.Getenv("Twitch_client_id") // replace this
clientSecret := os.Getenv("Twitch_Client_Secret") // replace this
botOAuth :+ os.Getenv("BOT_OAUTH")
channel := os Getenv("brycefromnz101")
clientID := os.Getenv("TWITCH_CLIENTID")
clientSecret := os.Getenv("TWITCH_CLIENT_SECRET")
botChannel := botUsername
if botUsername == "" || botOAuth == "" || channel == "" || clientID == "" || clientSecret == "" {