At the moment, the dotenv setup happens in a separate file: src/env.js. This file is imported in the src/index.js file for initializing all the environment variables from the .env file. Is there a way to have the initialization in the src/index.js file so that the src/models/index.js file has access to the process.env variables? In my case, these variables turned out to be undefined all the time.
At the moment, the dotenv setup happens in a separate file: src/env.js. This file is imported in the src/index.js file for initializing all the environment variables from the .env file. Is there a way to have the initialization in the src/index.js file so that the src/models/index.js file has access to the process.env variables? In my case, these variables turned out to be undefined all the time.