Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed the express issue, added suport for dynamic port #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions samples/express/hello-world.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
* Express must be installed for this sample to work
*/

var port = Number(process.env.PORT || 3000);

var tropowebapi = require('tropo-webapi');
var express = require('express');

var app = express.createServer();
var app = express();

app.post('/', function(req, res){
// Create a new instance of the TropoWebAPI object.
Expand All @@ -18,5 +20,5 @@ app.post('/', function(req, res){
});


app.listen(8000);
console.log('Server running on http://0.0.0.0:8000/')
app.listen(port);
console.log('Server running on: ' + port);