Skip to content

Instantly share code, notes, and snippets.

@JamesDaniel
Last active January 10, 2017 19:07
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 JamesDaniel/175fb6700f700f1510065d34d6c7f8d4 to your computer and use it in GitHub Desktop.
Save JamesDaniel/175fb6700f700f1510065d34d6c7f8d4 to your computer and use it in GitHub Desktop.
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