post in express

PHOTO EMBED

Tue Aug 31 2021 07:35:20 GMT+0000 (UTC)

Saved by @faisals #node

app.post('/expressions', (req, res, next) => {
  const receivedExpression = createElement('expressions', req.query);
  if (receivedExpression) {
    expressions.push(receivedExpression);
    res.status(201).send(receivedExpression);
  } else {
    res.status(400).send();
  }
});
content_copyCOPY