Santhosh has uploaded a new change for review. https://gerrit.wikimedia.org/r/136278
Change subject: Use the port from config.js if available ...................................................................... Use the port from config.js if available Bug: 64540 Change-Id: Id3d3804eb3914bcc7596b50b07adce899cbb7441 --- M ContentTranslationService.js 1 file changed, 10 insertions(+), 2 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver refs/changes/78/136278/1 diff --git a/ContentTranslationService.js b/ContentTranslationService.js index 17142b2..1b5ba64 100644 --- a/ContentTranslationService.js +++ b/ContentTranslationService.js @@ -21,11 +21,19 @@ app = express(), logger = require( __dirname + '/utils/Logger.js' ), args = require( 'minimist' )( process.argv.slice( 2 ) ), - port = args.port || 8080, + port = args.port, privateKey, certificate, credentials, pkg = require( __dirname + '/package.json' ); + +if ( !port ) { + try { + port = require( __dirname + '/config.js' ).port; + } catch ( e ) { + port = 8080; + } +} app = express(); // Starts https server only if all needed args provided, else starts http server. @@ -98,7 +106,7 @@ } ); // Everything else goes through this. app.use( express.static( __dirname + '/public' ) ); -logger.info( instanceName + ' ready. Listening on port: ' + port ); +console.log( instanceName + ' ready. Listening on port: ' + port ); server.listen( port ); module.exports = app; -- To view, visit https://gerrit.wikimedia.org/r/136278 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Id3d3804eb3914bcc7596b50b07adce899cbb7441 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/services/cxserver Gerrit-Branch: master Gerrit-Owner: Santhosh <santhosh.thottin...@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits