diff options
| author | jackyzha0 <[email protected]> | 2020-05-09 12:22:31 -0700 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2020-05-09 12:22:31 -0700 |
| commit | 043e347703b780781bb2a16946299ff493215c76 (patch) | |
| tree | cc2f152de2b22c7bf7542b12d6ce3035412abdf2 /db | |
| parent | initial files (diff) | |
| download | ctrl-v-043e347703b780781bb2a16946299ff493215c76.tar.xz ctrl-v-043e347703b780781bb2a16946299ff493215c76.zip | |
healthcheck + basic api
Diffstat (limited to 'db')
| -rw-r--r-- | db/db.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/db/db.go b/db/db.go new file mode 100644 index 0000000..9ff1a5e --- /dev/null +++ b/db/db.go @@ -0,0 +1,21 @@ +package db + +import ( + "os" + + "github.com/joho/godotenv" + log "github.com/sirupsen/logrus" +) + +func init() { + // load .env file + err := godotenv.Load() + if err != nil { + log.Fatal("Error loading .env file") + } + + mUser := os.Getenv("MONGO_USER") + mPass := os.Getenv("MONGO_PASS") + + log.Infof("got %s and %s", mUser, mPass) +} |