diff --git a/app.js b/app.js index 082c89d..23e6630 100644 --- a/app.js +++ b/app.js @@ -2,6 +2,7 @@ var express = require('express') , app = express.createServer() , nodemailer = require('nodemailer') , _ = require('underscore') + , fs = require('fs') /* , amazonses = require('amazon-ses') */ @@ -37,7 +38,9 @@ app.use(express.bodyParser()); /* Homepage */ app.get('/', function(req, res) { - res.send("it's running"); + fs.readFile(__dirname + '/views/index.html', 'utf8', function(err, text){ + res.send(text); + }); }); app.post('/text', function(req, res) { @@ -205,7 +208,7 @@ function sendText(phone, message, cb) { */ } -var port = process.env.PORT || 8080; +var port = process.env.PORT || 9090; app.listen(port, function() { console.log('Listening on', port); }); diff --git a/views/index.html b/views/index.html new file mode 100644 index 0000000..dbf4ccd --- /dev/null +++ b/views/index.html @@ -0,0 +1,68 @@ + + + + + + TextBelt by typpo + + + + + + + + + + + +
+ +
+
+

TextBelt

+

Free texting API

+
+ + Generated by GitHub Pages — Theme by mattgraham +
+ +

TextBelt

+ +

TextBelt is a texting API that uses carrier-specific gateways to deliver your text messages for free. This is nice for a low-cost texting app or testing without running down your Twilio balance.

+ +

Usage is dead simple:

+ +
$ curl http://textbelt.com/text \
+   -d number=5551234567 \
+   -d "message=I sent this message for free with textbelt.com"
+
+ +

Success and Failure

+ +

Sample success:

+ +
{"success":true}
+
+ +

Sample failure:

+ +
{"success":false,"message":"Exceeded quota for this phone number."}
+
+ +

Notes and Limitations

+ + +
+ +
+ + +