Hello npm world!
You first need to export sendgrid key as environment variable:
export SENDGRID_API_KEY='your-super-secret-sendgrid-key'
Example usage of the -very, very- minimalistic mailer module.
var mailer = require("./mailer-module.js");
var apiKey = process.env.SENDGRID_API_KEY;
mailer.initialize(apiKey);
mailer.sendMail("sender@mail.com", "recipient@mail.com", "Hey yo mate!", ":):):):)");