Skip to content

Instantly share code, notes, and snippets.

@matthieu-D
Created October 10, 2017 14:29
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 matthieu-D/56492b4a524b907ed6e2197831a401a5 to your computer and use it in GitHub Desktop.
Save matthieu-D/56492b4a524b907ed6e2197831a401a5 to your computer and use it in GitHub Desktop.
app.post('/visa', function (req, res) {
var params = req.body.result.parameters;
res.setHeader('Content-Type', 'application/json');
var deliveryTime = calculateDeliveryTime();
response = `Your Visa for ${params.geoCountry} will be ready in ${deliveryTime}`;
res.send(JSON.stringify({ "speech": response, "displayText": response}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment