extend environment and use injected app config

This commit is contained in:
William Welling
2021-12-06 16:54:55 -06:00
parent 71f5b46639
commit 33488ccf40
25 changed files with 742 additions and 1203 deletions

View File

@@ -1,16 +1,14 @@
import * as child from 'child_process';
import { environment } from '../src/environments/environment';
import { AppConfig } from '../src/config/app-config.interface';
import { buildAppConfig } from '../src/config/config.server';
// import { AppConfig } from '../src/config/app-config.interface';
// import { buildAppConfig } from '../src/config/config.server';
// const appConfig: AppConfig = buildAppConfig();
const appConfig: AppConfig = buildAppConfig();
/**
* Calls `ng serve` with the following arguments configured for the UI in the environment: host, port, nameSpace, ssl
* Calls `ng serve` with the following arguments configured for the UI in the app config: host, port, nameSpace, ssl
*/
child.spawn(
`ng serve --host ${environment.ui.host} --port ${environment.ui.port} --serve-path ${environment.ui.nameSpace} --ssl ${environment.ui.ssl}`,
{ stdio:'inherit', shell: true }
`ng serve --host ${appConfig.ui.host} --port ${appConfig.ui.port} --serve-path ${appConfig.ui.nameSpace} --ssl ${appConfig.ui.ssl}`,
{ stdio: 'inherit', shell: true }
);