I have the following directory structure: 
I am using dotenv to load environment variables but its not loading them.It gives undefined even though I have defined them in the .env file.
The code in index.js is here:
I've even tried the following for requiring:
require('dotenv').config();
require('dotenv').config({path:'C:\Users\xuios\Desktop\AirlineManagementProject\FlightsAndSearch\src\.env'}); // absolute path
require('dotenv').config({path:'FlightsAndSearch\src\.env'}); //relative path

