Skip to content

Instantly share code, notes, and snippets.

@mdz
Created February 27, 2012 22:15
Show Gist options
  • Select an option

  • Save mdz/1927490 to your computer and use it in GitHub Desktop.

Select an option

Save mdz/1927490 to your computer and use it in GitHub Desktop.
var PagerDuty = require('pagerduty');
var fs = require('fs');
var apikeys = JSON.parse(fs.readFileSync('Config/apikeys.json'));
var pager = new PagerDuty({serviceKey: apikeys['pagerduty']});
pager.create({
description: process.argv[2], // required
details: { },
callback: function(err, response) {
if (err) throw err;
console.log("Success.");
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment