Make port a constant

This commit is contained in:
Girish Ramakrishnan
2019-07-25 15:43:51 -07:00
parent b03bf87b7d
commit 12eae1eff2
25 changed files with 45 additions and 32 deletions

View File

@@ -39,7 +39,7 @@ var appdb = require('../../appdb.js'),
uuid = require('uuid'),
_ = require('underscore');
var SERVER_URL = 'http://localhost:' + config.get('port');
var SERVER_URL = 'http://localhost:' + constants.PORT;
// Test image information
var TEST_IMAGE_REPO = 'cloudron/test';
@@ -841,7 +841,7 @@ describe('App installation', function () {
it('logStream - stream logs', function (done) {
var options = {
port: config.get('port'), host: 'localhost', path: '/api/v1/apps/' + APP_ID + '/logstream?access_token=' + token,
port: constants.PORT, host: 'localhost', path: '/api/v1/apps/' + APP_ID + '/logstream?access_token=' + token,
headers: { 'Accept': 'text/event-stream', 'Connection': 'keep-alive' }
};