Skip to content

Commit

Permalink
Merge pull request #2 from m-a-y-a-n-k/master
Browse files Browse the repository at this point in the history
Heroku set
  • Loading branch information
nikgupta0009 authored Nov 7, 2017
2 parents 74a6f75 + 849b84e commit d4d24f8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ var transporter = nodemailer.createTransport({
}
});

app.set('port',process.env.port||5000);

function allValid(){
for (var i=0; i < arguments.length; i++) {
if( arguments[i] == null || arguments[i] == undefined ){
Expand Down Expand Up @@ -315,4 +317,6 @@ app.get("/u/state",function(req,response){
pushSensorData(q.temp,q.humidity,q.light,q.inDoorMotion,q.outDoorMotion,q.ax,q.ay,q.az);
}
});
app.listen(2300);
app.listen(app.get('port'),function(){
console.log('Node app is running on port',app.get('port'));
});

0 comments on commit d4d24f8

Please sign in to comment.