aboutsummaryrefslogtreecommitdiff
path: root/cmd/app
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/app')
-rw-r--r--cmd/app/conf.toml4
-rw-r--r--cmd/app/main.go9
2 files changed, 9 insertions, 4 deletions
diff --git a/cmd/app/conf.toml b/cmd/app/conf.toml
index 47964b4..bdbf58b 100644
--- a/cmd/app/conf.toml
+++ b/cmd/app/conf.toml
@@ -8,6 +8,10 @@ password="cryptoportfolio-dev"
8database="cryptoportfolio" 8database="cryptoportfolio"
9address="localhost:5432" 9address="localhost:5432"
10 10
11[redis]
12type="tcp"
13address="cryptoportfolio.immae.eu:7617"
14
11[api] 15[api]
12domain="localhost" 16domain="localhost"
13jwt_secret="secret" 17jwt_secret="secret"
diff --git a/cmd/app/main.go b/cmd/app/main.go
index 4bd77bd..65e8b5a 100644
--- a/cmd/app/main.go
+++ b/cmd/app/main.go
@@ -26,9 +26,10 @@ type ApiConfig struct {
26} 26}
27 27
28type Config struct { 28type Config struct {
29 App AppConfig 29 App AppConfig
30 Api ApiConfig 30 Api ApiConfig
31 Db db.DBConfig 31 Db db.DBConfig
32 Redis db.RedisConfig
32 33
33 utils.LogConfiguration 34 utils.LogConfiguration
34 Address string 35 Address string
@@ -64,7 +65,7 @@ func init() {
64 65
65 api.SetJwtSecretKey(C.Api.JwtSecret) 66 api.SetJwtSecretKey(C.Api.JwtSecret)
66 67
67 db.Init(C.Db) 68 db.Init(C.Db, C.Redis)
68 69
69 if C.Mode == "production" { 70 if C.Mode == "production" {
70 gin.SetMode(gin.ReleaseMode) 71 gin.SetMode(gin.ReleaseMode)