Skip to content

Instantly share code, notes, and snippets.

@xcambar
Created March 3, 2014 17:14
Show Gist options
  • Save xcambar/9329773 to your computer and use it in GitHub Desktop.
Save xcambar/9329773 to your computer and use it in GitHub Desktop.
Example of Hull API with node-restify
var restify = require('restify');
var client = restify.createJsonClient({
url: 'https://YOUR_ORG_NAMESPACE.hullapp.io',
headers: {
'Hull-App-Id': 'YOUR_APP_ID',
'Hull-Access-Token': 'YOUR_APP_SECRET'
}
});
client.get('/api/v1/users', function (err, req, res, obj) {
console.log("Your app has %s users", obj.length);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment