-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
27 lines (19 loc) · 679 Bytes
/
index.js
File metadata and controls
27 lines (19 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
* Showing with the Express framwork http://expressjs.com/
* Express must be installed for this sample to work
*/
var tropowebapi = require('./lib/tropo-webapi');
var express = require('express');
var app = express();
app.get('/', function (req, res) {
res.send('Hello from Cisco Shipped!');
});
app.post('/', function(req, res){
// Create a new instance of the TropoWebAPI object.
var tropo = new tropowebapi.TropoWebAPI();
// Use the say method https://www.tropo.com/docs/webapi/say.htm
tropo.say("Welcome to tropo shipped project.");
res.send(tropowebapi.TropoJSON(tropo));
});
app.listen(3000);
console.log('Server running on http://0.0.0.0:3000/')