Compare commits
No commits in common. "f07131086a826ee0a92296d220bd5e1e1254a076" and "2a4a092cb2c30ab1e967e6ec9c1a3f43c046e94a" have entirely different histories.
f07131086a
...
2a4a092cb2
1 changed files with 6 additions and 13 deletions
9
core.go
9
core.go
|
@ -36,7 +36,6 @@ var cacheC CacheConfig
|
||||||
var db *gorm.DB
|
var db *gorm.DB
|
||||||
var mailer *Mailer
|
var mailer *Mailer
|
||||||
var basePath string
|
var basePath string
|
||||||
var runMode string
|
|
||||||
var disableEvents bool = false
|
var disableEvents bool = false
|
||||||
|
|
||||||
//go:embed all:template
|
//go:embed all:template
|
||||||
|
@ -108,14 +107,12 @@ func (app *App) Run(router *httprouter.Router) {
|
||||||
}
|
}
|
||||||
useHttps, _ := strconv.ParseBool(useHttpsStr)
|
useHttps, _ := strconv.ParseBool(useHttpsStr)
|
||||||
|
|
||||||
if runMode == "dev" {
|
|
||||||
fmt.Printf("Welcome to Goffee\n")
|
fmt.Printf("Welcome to Goffee\n")
|
||||||
if useHttps {
|
if useHttps {
|
||||||
fmt.Printf("Listening on https \nWaiting for requests...\n")
|
fmt.Printf("Listening on https \nWaiting for requests...\n")
|
||||||
} else {
|
} else {
|
||||||
fmt.Printf("Listening on port %s\nWaiting for requests...\n", portNumber)
|
fmt.Printf("Listening on port %s\nWaiting for requests...\n", portNumber)
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// check if use letsencrypt
|
// check if use letsencrypt
|
||||||
UseLetsEncryptStr := os.Getenv("App_USE_LETSENCRYPT")
|
UseLetsEncryptStr := os.Getenv("App_USE_LETSENCRYPT")
|
||||||
|
@ -180,7 +177,7 @@ func (app *App) RegisterRoutes(routes []Route, router *httprouter.Router) *httpr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if enable core services
|
// check if use letsencrypt
|
||||||
UseCoreServicesStr := os.Getenv("App_USE_CORESERVICES")
|
UseCoreServicesStr := os.Getenv("App_USE_CORESERVICES")
|
||||||
if UseCoreServicesStr == "" {
|
if UseCoreServicesStr == "" {
|
||||||
UseCoreServicesStr = "false"
|
UseCoreServicesStr = "false"
|
||||||
|
@ -574,10 +571,6 @@ func (app *App) SetBasePath(path string) {
|
||||||
basePath = path
|
basePath = path
|
||||||
}
|
}
|
||||||
|
|
||||||
func (app *App) SetRunMode(runmode string) {
|
|
||||||
runMode = runmode
|
|
||||||
}
|
|
||||||
|
|
||||||
func DisableEvents() {
|
func DisableEvents() {
|
||||||
disableEvents = true
|
disableEvents = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue