Skip to content

Instantly share code, notes, and snippets.

@JamesDaniel JamesDaniel/file.rb
Last active Jan 10, 2017

What would you like to do?
node REST end point with ID
app.get('/user/:uid/files/*', function(req, res){
var uid = req.params.uid,
path = req.params[0] ? req.params[0] : 'index.html';
res.sendfile(path, {root: './public'});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.