1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Add db port environment variable.

This commit is contained in:
Ferdinand Mütsch
2019-11-07 23:29:28 +01:00
parent fe1cc3ac88
commit 4ae53746c3
4 changed files with 18 additions and 6 deletions

View File

@@ -37,9 +37,6 @@ func readConfig() *models.Config {
dbName, valid := os.LookupEnv("WAKAPI_DB_NAME")
dbPortStr, valid := os.LookupEnv("WAKAPI_DB_PORT")
dbPort, err := strconv.Atoi(dbPortStr)
if err != nil {
dbPort = 3306
}
if !valid {
log.Fatal("Environment variables missing or invalid.")