Skip to content

Instantly share code, notes, and snippets.

@seymores
Created January 4, 2017 15:20
Show Gist options
  • Save seymores/60ff8366fb5ba80c4ff58c9a47a65bf6 to your computer and use it in GitHub Desktop.
Save seymores/60ff8366fb5ba80c4ff58c9a47a65bf6 to your computer and use it in GitHub Desktop.
Algorithmia = require("algorithmia");
const request = require('request');
exports.apply = function(input, cb) {
let url = 'http://104.196.34.244:80/' + input;
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
out = body
} else {
out = error
}
cb(null, out);
})
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment