This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@MathieuGosbeeHPPre:~/nvm/src/node-v0.6.18# make | |
Waf: Entering directory `/var/home/root/nvm/src/node-v0.6.18/out' | |
DEST_OS: linux | |
DEST_CPU: arm | |
Parallel Jobs: 1 | |
Product type: program | |
[ 5/35] libv8.a: deps/v8/SConstruct -> out/Release/libv8.a | |
/opt/bin/python "/var/home/root/nvm/src/node-v0.6.18/tools/scons/scons.py" -j 1 | |
-C "/var/home/root/nvm/src/node-v0.6.18/out/Release/" -Y "/var/home/root/nvm/src | |
/node-v0.6.18/deps/v8" visibility=default mode=release arch=arm toolchain=gcc li |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var observable = function (data) { | |
var _data = data; | |
var _callbacks = []; | |
var self = this; | |
this.subscribe = function (callback) { | |
_callbacks.push(callback); | |
}; | |
this.get = function () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// var test = new API("Router.svc"); | |
// test.get().top(5).view("map"); | |
// It should execute() only when the last function has been called. | |
var API = function (webservice) { | |
this.webservice(webservice); | |
return this; | |
}; | |
API.prototype = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: { | |
one: 'one', | |
two: ['three','four', {five: 'six'}] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Using nodeJS & express. | |
var Tropo = require('tropo-webapi'); | |
app.post('/inbound', function(req, res) { | |
var webapi = new Tropo.TropoWebAPI(); | |
var say = {value: "This is my message."} | |
webapi.message(say, "18882220101", false, "TEXT"); | |
res.send(TropoJSON(webapi)); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.post('/inboundTropo', function (req, res) { | |
res.contentType('application/json'); | |
console.log('INBOUND TROPO MESSAGE: '); | |
console.log(req.body); | |
var tropo = new TropoWebAPI(); | |
tropo.message(req.body.session.parameters.msg, { to:req.body.session.parameters.to, network:"SMS" }); | |
res.send(TropoJSON(tropo)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* | |
* SMS Number Classes | |
* | |
*/ | |
function NumberClass (Address) { | |
var self = this; | |
//console.log(Address); | |
this._messages = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var express = require('express'); | |
var app = express.createServer(); | |
app.get('/', function(req, res){ | |
res.render('./index.html'); | |
}); | |
app.listen(10083); |
NewerOlder