aboutsummaryrefslogtreecommitdiff
path: root/cmd/app
diff options
context:
space:
mode:
authorjloup <jeanloup.jamet@gmail.com>2018-04-30 22:28:59 +0200
committerjloup <jeanloup.jamet@gmail.com>2018-04-30 22:28:59 +0200
commit323b7f4032d19c06523f2eaaf1d20d32e1330b54 (patch)
treea8d966c703755c5986505f8ed742b666800df12b /cmd/app
parent4215df47c93c6ea26f21c74a9d52f78d1d103dde (diff)
downloadFront-323b7f4032d19c06523f2eaaf1d20d32e1330b54.tar.gz
Front-323b7f4032d19c06523f2eaaf1d20d32e1330b54.tar.zst
Front-323b7f4032d19c06523f2eaaf1d20d32e1330b54.zip
Redis connection.
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)