port use with proccess.env.PORT for heroku

This commit is contained in:
Arjun Patel
2018-07-23 21:20:55 -07:00
parent df3c21f81b
commit 7d03d42977
2 changed files with 12 additions and 1 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ var con = mysql.createConnection({
database: 'nexto'
});
var port = 3000;
var port = process.env.PORT || 3000;
server.listen(port, () => console.log('serving on port: ' + port));
app.get('/', function (req, res) {