-
Notifications
You must be signed in to change notification settings - Fork 112
Open
Description
I am not able to understand that why dotenv is not working after building
In src/index.js, I am having the following code,
import path from 'path';
const envPath = path.resolve(__dirname, '../.env');
require('dotenv').config({ path: envPath});
import app from './app';Now after running npm start, the .env file which is located in the root folder is not working, all the env variables are undefined. Am I missing something?
**Alternative ways **
These are the alternative ways I am using right now:
- docker-compose
- PM2
ecosystem.config.js
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels