Skip to content

Commit 1229c5a

Browse files
committed
feat: load .env in runtime
1 parent 052212e commit 1229c5a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

env.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import { config } from 'dotenv';
2+
3+
const { parsed } = config();
4+
export default parsed;

index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import mongoose from 'mongoose';
22
import Promise from 'bluebird';
3+
import './env';
34
import app from './app';
45

56
mongoose.Promise = Promise;

0 commit comments

Comments
 (0)