Skip to content

Instantly share code, notes, and snippets.

@ericholiveira
Created May 6, 2016 00:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericholiveira/36761c3b09af8e837434bcace857ad8e to your computer and use it in GitHub Desktop.
Save ericholiveira/36761c3b09af8e837434bcace857ad8e to your computer and use it in GitHub Desktop.
var Studio = require('studio');
var express = require('express');
var app = express();
var searchForContent = Studio.module('Reddit')('searchForContent');
app.get('/:path', function (req, res) {
searchForContent(req.params.path).then(function(result){
res.send(result);
}).catch(function(error){
console.log(error);
res.send(error);
});
});
app.listen(3000,function(err){
console.log('Server listening at http://localhost:3000');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment