diff --git a/samples/express/hello-world.js b/samples/express/hello-world.js index 60d75a9..8979c75 100644 --- a/samples/express/hello-world.js +++ b/samples/express/hello-world.js @@ -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. @@ -18,5 +20,5 @@ app.post('/', function(req, res){ }); -app.listen(8000); -console.log('Server running on http://0.0.0.0:8000/') \ No newline at end of file +app.listen(port); +console.log('Server running on: ' + port);