Skip to content

Commit

Permalink
Merge pull request #23 from ckeditor/t/22
Browse files Browse the repository at this point in the history
Move dotenv to dependencies. Resolve problem with default port on Heroku
  • Loading branch information
elszczepano authored Jul 31, 2019
2 parents 16ddbff + e053b41 commit 5a4ea8c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion backend/.env.example
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
DEFAULT_PORT=
REDIS_HOST=
REDIS_PORT=
2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
"author": "CKSource (http://cksource.com/)",
"license": "MIT",
"dependencies": {
"dotenv": "^8.0.0",
"express": "^4.16.4",
"ioredis": "^4.9.5",
"socket.io": "^2.2.0",
"socket.io-redis": "^5.2.0"
},
"devDependencies": {
"chai": "^4.2.0",
"dotenv": "^8.0.0",
"mocha": "^6.1.4"
}
}
6 changes: 4 additions & 2 deletions backend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,10 @@ io.on( 'connection', socket => {
} );
} );

http.listen( process.env.DEFAULT_PORT, () => {
console.log( 'listening on *:' + process.env.DEFAULT_PORT );
const port = process.env.PORT || 3000;

http.listen( port, () => {
console.log( 'listening on *:' + port );
} );

function createIssueKey( repoName, pageType, issueId ) {
Expand Down

0 comments on commit 5a4ea8c

Please sign in to comment.