I'm using Yeoman's angular-fullstack generator.
And I have updated my server/config/environment/local.env.js file:
module.exports = {
DOMAIN: 'http://localhost:9000',
SESSION_SECRET: 'vfsite2-secret',
SENDGRID : {
API_KEY : 'my_api_key'
},
DEBUG: ''
};
How the best way can I use SENDGRID.API_KEY
else where on my server files, for instance on my server/api/thing/thing.controller.js
?
Notice this is not a duplicated question to this similar question, because I want to use on server-side.