32 lines
453 B
Go
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()
|
|
} |