use the server port from the environment file

This commit is contained in:
Art Lowel
2020-05-08 12:40:31 +02:00
parent 4fe2c75810
commit 4580f1b18a

View File

@@ -23,11 +23,12 @@ import { join } from 'path';
import { REQUEST, RESPONSE } from '@nguniversal/express-engine/tokens'; import { REQUEST, RESPONSE } from '@nguniversal/express-engine/tokens';
import * as bodyParser from 'body-parser'; import * as bodyParser from 'body-parser';
import * as cookieParser from 'cookie-parser'; import * as cookieParser from 'cookie-parser';
import { environment } from './src/environments/environment';
// Express server // Express server
const app = express(); const app = express();
const PORT = process.env.PORT || 4000; const PORT = environment.ui.port || 4000;
const DIST_FOLDER = join(process.cwd(), 'dist/browser'); const DIST_FOLDER = join(process.cwd(), 'dist/browser');
// * NOTE :: leave this as require() since this file is built Dynamically from webpack // * NOTE :: leave this as require() since this file is built Dynamically from webpack