summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 20:33:06 +0000
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2024-03-07 20:33:06 +0000
commitb8c096cb1615fb640b9c3dfd08fcf98d1a3913f8 (patch)
treef09cd848ae363465f93a1fc8c76843a92e4d2d7b /src
Initialises project
Diffstat (limited to 'src')
-rw-r--r--src/app.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app.js b/src/app.js
new file mode 100644
index 0000000..3e1a28c
--- /dev/null
+++ b/src/app.js
@@ -0,0 +1,16 @@
+const express = require('express');
+const { MessagingResponse } = require('twilio').twiml;
+
+const app = express();
+
+app.post('/sms', (req, res) => {
+ const twiml = new MessagingResponse();
+
+ twiml.message('The Robots are coming! Head for the hills!');
+
+ res.type('text/xml').send(twiml.toString());
+});
+
+app.listen(3000, () => {
+ console.log('Express server listening on port 3000');
+});