Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
cbetta committed Feb 22, 2017
1 parent d486f18 commit 8e529f5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ NEXMO_APP_FILE_NAME=
CALL_CENTER_NUMBER=
INBOUND_NUMBER_1=
INBOUND_NUMBER_2=
DOMAIN=
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The next step is to set up all of our variables in a `.env` file. You can start
mv .env.example .env
```

Fill in the values in `.env` as appropriate, where `INBOUND_NUMBER_1` and `INBOUND_NUMBER_2` are the numbers you just purchased, `CALL_CENTER_NUMBER` is the number you want them to direct to, and `NEXMO_APP_FILE_NAME` is the file name of your application key (`app.key`).
Fill in the values in `.env` as appropriate, where `INBOUND_NUMBER_1` and `INBOUND_NUMBER_2` are the numbers you just purchased, `CALL_CENTER_NUMBER` is the number you want them to direct to, and `NEXMO_APP_FILE_NAME` is the file name of your application key (`app.key`). Finally, `DOMAIN` is the public domain or hostname your server is available on.

With this in place you can start the server.

Expand Down
7 changes: 2 additions & 5 deletions lib/app.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
var express = require('express');
// var bodyParser = require('body-parser');

// create a new express server
var express = require('express');
var app = express();
app.set('port', (process.env.PORT || 5000));
// app.use(bodyParser.urlencoded({ extended: false }));

// start the app and listen on port 5000
app.listen(app.get('port'), '127.0.0.1', function() {
console.log('SMS Proxy App listening on port', app.get('port'));
console.log('Listening on port', app.get('port'));
});

module.exports = app;
2 changes: 1 addition & 1 deletion lib/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = function(app){
// set up we make sure to pass along the
// conference ID
answer_url: [
'http://c.betta.io/answer_outbound?conference_id='+conferenceID
'http://'+process.env['DOMAIN']+'/answer_outbound?conference_id='+conferenceID
]
}, function(err, suc) {
console.log("Error:", err);
Expand Down

0 comments on commit 8e529f5

Please sign in to comment.