From 1229c5a4c76411617dc8eb8575f26bc35afb92b2 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 7 Oct 2020 20:14:57 +0300 Subject: feat: load .env in runtime --- env.ts | 4 ++++ index.ts | 1 + 2 files changed, 5 insertions(+) create mode 100644 env.ts diff --git a/env.ts b/env.ts new file mode 100644 index 0000000..60874cc --- /dev/null +++ b/env.ts @@ -0,0 +1,4 @@ +import { config } from 'dotenv'; + +const { parsed } = config(); +export default parsed; diff --git a/index.ts b/index.ts index 9ba0431..e2146cd 100644 --- a/index.ts +++ b/index.ts @@ -1,5 +1,6 @@ import mongoose from 'mongoose'; import Promise from 'bluebird'; +import './env'; import app from './app'; mongoose.Promise = Promise; -- cgit v1.2.3