untitled notebook

node v12.22.12
version: 1.0.0
endpointsharetweet
const http = require('http'); const express = require('express'); const MessagingResponse = require('twilio').twiml.MessagingResponse; const app = express(); app.post('/sms', (req, res) => { const twiml = new MessagingResponse(); twiml.message('The Robots are coming! Head for the hills!'); res.writeHead(200, {'Content-Type': 'text/xml'}); res.end(twiml.toString()); }); http.createServer(app).listen(1337, () => { console.log('Express server listening on port 1337'); });
Loading…

no comments

    sign in to comment