diff options
author | eug-vs <eug-vs@keemail.me> | 2020-10-07 20:14:57 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-10-07 20:14:57 +0300 |
commit | 1229c5a4c76411617dc8eb8575f26bc35afb92b2 (patch) | |
tree | 1da41c0ed96cce1262239515b516f5d6c9f929ce | |
parent | 052212ef180af5a86fa4b79094a25802f0184139 (diff) | |
download | which-api-1229c5a4c76411617dc8eb8575f26bc35afb92b2.tar.gz |
feat: load .env in runtime
-rw-r--r-- | env.ts | 4 | ||||
-rw-r--r-- | index.ts | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -0,0 +1,4 @@ +import { config } from 'dotenv'; + +const { parsed } = config(); +export default parsed; @@ -1,5 +1,6 @@ import mongoose from 'mongoose'; import Promise from 'bluebird'; +import './env'; import app from './app'; mongoose.Promise = Promise; |