hello world

This commit is contained in:
2022-12-09 10:59:15 -06:00
commit 8ae527683b
13 changed files with 552 additions and 0 deletions

32
main.go Normal file
View File

@@ -0,0 +1,32 @@
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()
}