:
server/config/environment/local.env.js:
module.exports = {
DOMAIN: 'http://localhost:9000',
SESSION_SECRET: 'vfsite2-secret',
SENDGRID_API_KEY: 'my_api_key',
DEBUG: ''
};
server/config/environment/index.js:
var all = {
env: process.env.NODE_ENV,
sendgrid: {
'api_key': process.env.SENDGRID_API_KEY
}
};
api_key sendgrid server/api/thing/thing.controller.js:
import config from '../../config/environment';
var sendgrid = require("sendgrid")(config.sendgrid.api_key);