29 lines
462 B
Go
29 lines
462 B
Go
package main
|
|
|
|
import (
|
|
"log"
|
|
"rockhu-bot/local/api"
|
|
cronhu "rockhu-bot/local/utl/cron"
|
|
"rockhu-bot/local/utl/db"
|
|
discordrhu "rockhu-bot/local/utl/discord"
|
|
"rockhu-bot/local/utl/server"
|
|
|
|
"github.com/joho/godotenv"
|
|
|
|
"go.uber.org/dig"
|
|
)
|
|
|
|
func main() {
|
|
err := godotenv.Load()
|
|
if err != nil {
|
|
log.Fatal("error loading .env file")
|
|
}
|
|
di := dig.New()
|
|
|
|
cronhu.Init(di)
|
|
discordrhu.Init(di)
|
|
db.Start(di)
|
|
server := server.Start(di)
|
|
api.Init(di, server)
|
|
}
|