//go:build !js package config import ( "github.com/jackc/pgx/v5/tracelog" "github.com/rs/zerolog" ) var Config = HMNConfig{ Env: Dev, Addr: "localhost:9001", PrivateAddr: "localhost:9002", BaseUrl: "http://handmade.local:9001", LogLevel: zerolog.TraceLevel, // InfoLevel is recommended for production Postgres: PostgresConfig{ // the "db seed" command depends on this user existing in Postgres, so you'll want to make sure it exists when running locally. User: "hmn", Password: "password", Hostname: "localhost", Port: 5432, DbName: "hmn", LogLevel: tracelog.LogLevelError, // LogLevelWarn is recommended for production MinConn: 2, // Keep these low for dev, high for production MaxConn: 10, }, Auth: AuthConfig{ CookieDomain: ".handmade.local", CookieSecure: false, }, Admin: AdminConfig { AtomUsername: "admin", AtomPassword: "password", }, Email: EmailConfig{ ServerAddress: "smtp.example.com", ServerPort: 587, FromAddress: "noreply@example.com", FromName: "Handmade Network Team", MailerUsername: "actualuser@example.com", MailerPassword: "", ForceToAddress: "localdev@example.com", // NOTE(asaf): If this is not empty, all emails will be sent to this address. }, DigitalOcean: DigitalOceanConfig{ AssetsSpacesKey: "dummy", AssetsSpacesSecret: "dummy", AssetsSpacesRegion: "dummy", AssetsSpacesEndpoint: "http://handmade.local:9003/", AssetsSpacesBucket: "assets", AssetsPublicUrlRoot: "http://handmade.local:9003/assets/", // In prod, AssetsPublicUrlRoot will probably look something like: // // "https://bucket-name.region.cdn.digitaloceanspaces.com/" // // Note the trailing slash... RunFakeServer: true, FakeAddr: "localhost:9003", }, Discord: DiscordConfig{ BotToken: "", BotUserID: "", OAuthClientID: "", OAuthClientSecret: "", GuildID: "", MemberRoleID: "", ShowcaseChannelID: "", LibraryChannelID: "", StreamsChannelID: "", }, Twitch: TwitchConfig{ ClientID: "", ClientSecret: "", EventSubSecret: "", BaseUrl: "https://api.twitch.tv/helix", BaseIDUrl: "https://id.twitch.tv/oauth2", }, EpisodeGuide: EpisodeGuide{ CineraOutputPath: "./annotations/", Projects: map[string]string{"hero": "code", "riscy": "riscy", "bitwise": "bitwise"}, }, }