When I call process.env.MAILHOST which is in the .env it always returns undefined but if it's inside the project's src folder it returns the value that is informed
D:\Projetos\login-jwt\login-jwt\configs\mailer.config.ts
console.log('mail',process.env.MAILHOST);
return undefined
but on D:\Projetos\login-jwt\login-jwt\src\main.ts
app.listen(process.env.PORT);main.ts it finds the right value which is port 3000
D:\Projetos\login-jwt\login-jwt.env.env
PORT=3000
MAILHOST=smtp.gmail.com
MAILSERVICE=Gmail
[email protected]
PASSWORD=xxx@pass
.env?