Skip to content

Instantly share code, notes, and snippets.

@ghabs
Created April 18, 2014 18:16
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 ghabs/11057388 to your computer and use it in GitHub Desktop.
Save ghabs/11057388 to your computer and use it in GitHub Desktop.
Post.js
app.post('/headlines', function(req, res) {
var newHeadline = {
author: req.body.author,
text: req.body.text
}
headlines.push(newHeadline);
res.json(200);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment