Skip to content

Instantly share code, notes, and snippets.

@deveshkumar
Created Jun 30, 2013
Embed
What would you like to do?
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