diff --git a/backend/.env.example b/backend/.env.example index f69c034..7bea792 100644 --- a/backend/.env.example +++ b/backend/.env.example @@ -1,3 +1,2 @@ -DEFAULT_PORT= REDIS_HOST= REDIS_PORT= diff --git a/backend/package.json b/backend/package.json index 4faf9a4..a886311 100644 --- a/backend/package.json +++ b/backend/package.json @@ -10,6 +10,7 @@ "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", @@ -17,7 +18,6 @@ }, "devDependencies": { "chai": "^4.2.0", - "dotenv": "^8.0.0", "mocha": "^6.1.4" } } diff --git a/backend/src/index.js b/backend/src/index.js index 020ca3f..d8d4a3f 100644 --- a/backend/src/index.js +++ b/backend/src/index.js @@ -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 ) {