diff options
Diffstat (limited to 'cmd/app')
-rw-r--r-- | cmd/app/conf.toml | 4 | ||||
-rw-r--r-- | cmd/app/main.go | 9 |
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" | |||
8 | database="cryptoportfolio" | 8 | database="cryptoportfolio" |
9 | address="localhost:5432" | 9 | address="localhost:5432" |
10 | 10 | ||
11 | [redis] | ||
12 | type="tcp" | ||
13 | address="cryptoportfolio.immae.eu:7617" | ||
14 | |||
11 | [api] | 15 | [api] |
12 | domain="localhost" | 16 | domain="localhost" |
13 | jwt_secret="secret" | 17 | jwt_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 | ||
28 | type Config struct { | 28 | type 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) |