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 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"
+
+
+Sample success:
+ +{"success":true}
+
+
+Sample failure:
+ +{"success":false,"message":"Exceeded quota for this phone number."}
+
+
+IP addresses are limited to 75 texts per day. Phone numbers are limited to 3 texts every 3 minutes. If you need increased limits, please contact admin@textbelt.com.
Some carriers may deliver text messages from "txt@textbelt.com"
We support the following U.S. providers: Alltel, Ameritech, AT&T Wireless, Boost, CellularOne, Cingular, Edge Wireless, Sprint PCS, Telus Mobility, T-Mobile, Metro PCS, Nextel, O2, Orange, Qwest, Rogers Wireless, US Cellular, Verizon, Virgin Mobile.