Permalink
Find file
30673b8 Nov 15, 2011
@danwrong @sdepold
executable file 23 lines (17 sloc) 521 Bytes
#!/usr/bin/env node
require.paths.push(process.cwd());
var sys = require('util'),
rest = require('../lib/restler'),
repl = require('repl');
var replServer = repl.start();
var exportMethods = {
sys: sys,
rest: rest
}
Object.keys(exportMethods).forEach(function(exportMethod) {
replServer.context[exportMethod] = exportMethods[exportMethod];
});
rest.get('http://twaud.io/api/v1/7.json').on('complete', function(data, response) {
console.log(response.headers);
replServer.context.data = data;
});