From 9347e84dbfb9627a0177e2a6c760bff4d6aff0e1 Mon Sep 17 00:00:00 2001 From: typpo Date: Sat, 7 Apr 2012 15:26:21 -0400 Subject: [PATCH] add index page --- app.js | 7 +++-- views/index.html | 68 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 views/index.html 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

+ +
    +
  • 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.

  • +
+
+ +
+ + +