summaryrefslogtreecommitdiff
path: root/src/app.js
blob: 04d192a7cc3bb6edb6bdfc4c78ebcc71fcc9acf8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
const express = require('express');
const { MessagingResponse } = require('twilio').twiml;

const app = express();

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

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