How to use .env in custom controller

Example:

const credentials = {
email: process.env.AWS_LOGIN_EMAIL,
password: process.env.AWS_LOGIN_PASSWORD,
};

In your .env-File (or Environment):

AWS_LOGIN_EMAIL=test
AWS_LOGIN_PASSWORD=123

5 Likes