hello world
This commit is contained in:
32
main.go
Normal file
32
main.go
Normal 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()
|
||||
}
|
||||
Reference in New Issue
Block a user