Put env PORT back in place for compatibility
Update some output/comments
This commit is contained in:
parent
a90a0e6595
commit
8a821c7861
|
@ -1,7 +1,7 @@
|
||||||
// ABOUT
|
// ABOUT
|
||||||
// Runs the SyncLounge Web App - handles serving the static web content and link shortening services
|
// Runs the SyncLounge Web App - handles serving the static web content and link shortening services
|
||||||
// Port defaults to 8088
|
// Port defaults to 8088
|
||||||
// REQUIRED: Access URL must be set using --accessUrl=<URL> or accessUrl ENV variable
|
// REQUIRED: Access URL must be set. See documentation for how to set this.
|
||||||
|
|
||||||
const express = require('express');
|
const express = require('express');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
@ -14,12 +14,11 @@ const SailsDisk = require('sails-disk');
|
||||||
const SettingsHelper = require('./SettingsHelper');
|
const SettingsHelper = require('./SettingsHelper');
|
||||||
|
|
||||||
const settings = new SettingsHelper();
|
const settings = new SettingsHelper();
|
||||||
console.log('Settings', settings);
|
let PORT = process.env['PORT'] ||settings.webapp_port || 8088;
|
||||||
let PORT = settings.webapp_port || 8088;
|
|
||||||
|
|
||||||
const bootstrap = () => new Promise(async (resolve, reject) => {
|
const bootstrap = () => new Promise(async (resolve, reject) => {
|
||||||
if (!settings.accessUrl) {
|
if (!settings.accessUrl) {
|
||||||
console.log('Missing required argument `accessUrl`. EG. "node webapp.js -accessUrl=http://sl.example.com". This URL is used for redirecting invite links.');
|
console.log('Missing required argument `accessUrl`. This URL is used for redirecting invite links. See documentation for how to set this');
|
||||||
return reject(new Error('Missing URL for invite links'));
|
return reject(new Error('Missing URL for invite links'));
|
||||||
}
|
}
|
||||||
if (!settings.webapp_port) {
|
if (!settings.webapp_port) {
|
||||||
|
|
Loading…
Reference in New Issue