Skip to content

Instantly share code, notes, and snippets.

@victorpaulo
Created August 26, 2019 13:37
Show Gist options
  • Save victorpaulo/13c544c87e8822a0369d55f2038ccaf4 to your computer and use it in GitHub Desktop.
Save victorpaulo/13c544c87e8822a0369d55f2038ccaf4 to your computer and use it in GitHub Desktop.
Twilio WhatsApp Sandbox
'use strict';
const express = require('express');
const bodyParser = require('body-parser');
// Constants
const port = process.env.PORT || 8080;
// App
const app = express();
app.use(bodyParser.urlencoded({
extended: true
}));
app.use(bodyParser.json());
app.post('/', function (req, res) {
console.log("echo post");
console.log(req.headers)
console.log(req.body)
});
var server = app.listen(port, function () {
console.log('Server running at http://127.0.0.1:' + port + '/');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment