chore: Setup dotenv for the express application

This commit is contained in:
Faruk AYDIN
2021-10-03 20:28:22 +02:00
committed by Ali BARIN
parent fbc2b1e00a
commit a4ddc8b50c
5 changed files with 25 additions and 5 deletions

View File

@@ -0,0 +1,12 @@
import * as dotenv from 'dotenv';
dotenv.config();
type AppEnv = {
port: string,
}
const appEnv: AppEnv = {
port: process.env.PORT || '3000',
}
export default appEnv;