instances: 1
buildpacks:
- https://github.com/cloudfoundry/nodejs-buildpack
- no-route: true
+ # no-route: true
+ routes:
+ - route: e-mobility-charging-stations-simulator.cfapps.sap.hana.ondemand.com
health-check-type: process
health-check-invocation-timeout: 10
command: node -r source-map-support/register dist/start.cjs
);
}
let uiServerConfiguration: UIServerConfiguration = {
- enabled: true,
+ enabled: false,
type: ApplicationProtocol.WS,
options: {
host: Constants.DEFAULT_UI_WEBSOCKET_SERVER_HOST,
Configuration.getConfig().uiServer
);
}
+ if (Configuration.isCFEnvironment() === true) {
+ delete uiServerConfiguration.options.host;
+ uiServerConfiguration.options.port = parseInt(process.env.PORT);
+ }
return uiServerConfiguration;
}
}
}
+ private static isCFEnvironment(): boolean {
+ return process.env.VCAP_APPLICATION !== undefined;
+ }
+
private static getDefaultPerformanceStorageUri(storageType: StorageType) {
const SQLiteFileName = `${Constants.DEFAULT_PERFORMANCE_RECORDS_DB_NAME}.db`;
switch (storageType) {
return item && typeof item === 'object' && Array.isArray(item) === false;
}
+ private static objectHasOwnProperty(object: unknown, property: string): boolean {
+ return Object.prototype.hasOwnProperty.call(object, property) as boolean;
+ }
+
+ private static isUndefined(obj: unknown): boolean {
+ return typeof obj === 'undefined';
+ }
+
private static deepMerge(target: object, ...sources: object[]): object {
if (!sources.length) {
return target;
return Configuration.deepMerge(target, ...sources);
}
- private static objectHasOwnProperty(object: unknown, property: string): boolean {
- return Object.prototype.hasOwnProperty.call(object, property) as boolean;
- }
-
- private static isUndefined(obj: unknown): boolean {
- return typeof obj === 'undefined';
- }
-
private static handleFileException(
logPrefix: string,
fileType: FileType,