summaryrefslogtreecommitdiff
path: root/src/app.js
blob: 8c863a290126309afb5042ecd07a1f0bbc49e265 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const bodyParser = require('body-parser');
const express = require('express');
const { MessagingResponse } = require('twilio').twiml;

const app = express();

app.use(bodyParser.urlencoded({ extended: false }));

app.post('/sms', (req, res) => {
  const 
  const twiml = new MessagingResponse();
  res.type('text/xml').send(twiml.toString());
});

app.listen(3000, () => {
  console.log('Express server listening on port 3000');
});