Skip to content

Instantly share code, notes, and snippets.

@deveshkumar
Created June 30, 2013 16:11
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 deveshkumar/5895777 to your computer and use it in GitHub Desktop.
Save deveshkumar/5895777 to your computer and use it in GitHub Desktop.
5 Code Signals
app.post('/api/friends', function(req, res,next){
new_friend = new Friends({ name: req.body.name,user_id: req.currentUser.id });
new_friend.save();
res.send(new_friend);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment