In the production server with Beego I get
must have one register DataBase alias named default
I know the db connection credentials work in the server but whenever I do restful request I get this error and the Beego server crashes.
Is there a reason why this is happening?
Below is the code inside main.go init function:
orm.RegisterDriver("postgres", orm.DR_Postgres)
orm.RegisterDataBase("default", "postgres",
fmt.Sprintf("postgres://%s:%s@%s/%s?port=%i",
pgUser, pgPass, pgHost, pgDb, pgPort))