Created
May 6, 2016 00:23
-
-
Save ericholiveira/36761c3b09af8e837434bcace857ad8e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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