Files
discord-retokenizer/main.go
2022-12-09 10:59:15 -06:00

32 lines
453 B
Go

package main
import (
"os"
"git.zomo.dev/zomo/discord-retokenizer/endpoints"
"git.zomo.dev/zomo/discord-retokenizer/storage"
"github.com/joho/godotenv"
)
func checkEnv(env string) {
if os.Getenv(env) == "" {
panic(env + " not set")
}
}
func loadEnv() {
err := godotenv.Load()
if err != nil {
panic(err)
}
checkEnv("REDIS_URI")
}
func main() {
loadEnv()
storage.Init()
endpoints.Run()
}