From 7bf2f3b760a38b2e6206eb03ff792b4a5cbec698 Mon Sep 17 00:00:00 2001 From: Hamid FzM Date: Fri, 21 Sep 2018 23:20:38 +0330 Subject: [PATCH] Make application gin compatible --- .gitignore | 2 ++ helpers/config.go | 1 + 2 files changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index fc7309e..b19ff05 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,5 @@ Temporary Items .apdisk vendor/ + +gin-bin \ No newline at end of file diff --git a/helpers/config.go b/helpers/config.go index 4d83618..8045c74 100644 --- a/helpers/config.go +++ b/helpers/config.go @@ -24,6 +24,7 @@ func init() { viper.SetDefault("debug", false) viper.SetDefault("secret", "secret") viper.SetDefault("db_name", "data/timechi.db") + viper.BindEnv("port", "PORT") } func initConfig() {