Refactor app structure: move models to domain, centralize config and database init - TODO: add jwt
This commit is contained in:
@@ -19,7 +19,9 @@ type config struct {
|
||||
Tag string
|
||||
}
|
||||
|
||||
func SetupAppContext() *config {
|
||||
var Config *config
|
||||
|
||||
func Load() *config {
|
||||
// Get mastodon instance
|
||||
instance := os.Getenv("CAOM_INSTANCE")
|
||||
if instance == "" {
|
||||
@@ -77,3 +79,7 @@ func SetupAppContext() *config {
|
||||
return appContext
|
||||
|
||||
}
|
||||
|
||||
func Init() {
|
||||
Config = Load()
|
||||
}
|
||||
|
Reference in New Issue
Block a user