Skip to content

Instantly share code, notes, and snippets.

@antydemant
Created September 27, 2017 14:22
Show Gist options
  • Save antydemant/2102d87caf018784977d857ab9ffc993 to your computer and use it in GitHub Desktop.
Save antydemant/2102d87caf018784977d857ab9ffc993 to your computer and use it in GitHub Desktop.
Firebase + Expres.js RESTful API, create new line of questions
router.post('/create',function (req, res, next) {
var questions = db.questions;
questions.push({
answerType: req.body.answerType,
questionText: req.body.questionText
});
res.sendStatus(201);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment