Deploy several WebMap Apps in the same Server
If you would like to deploy multiple migrated applications on the same server and pointing to the same domain, but in different ports, follow these steps:
Front end configuration
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { AppComponent } from './app.component';
import { BaseComponentsModule } from '@mobilize/base-components';
import { WebMapModule, WebMapService, WEBMAP_CONFIG } from '@mobilize/angularclient';
import { PowerComponentsModule } from '@mobilize/powercomponents';
import { DISPATCHModule } from './DISPATCH.module';
import { HttpClientXsrfModule } from "@angular/common/http";
const config = {
useDynamicServerEvents: true,
webMapVersion: 'v5',
usePercentage: false,
useBundleEvent: true
};
@NgModule({
declarations: [AppComponent],
imports: [
HttpClientXsrfModule.wihOptions({
cookieName: "My-Xsrf-Cookie", // Customized cookie name
headerName: "My-Xsrf-Header", // Customized header name
}),
BrowserModule,
WebMapModule,
BaseComponentsModule,
PowerComponentsModule,
DISPATCHModule,
],
providers: [WebMapService, { provide: WEBMAP_CONFIG, useValue: config }],
bootstrap: [AppComponent],
schemas: [CUSTOM_ELEMENTS_SCHEMA],
})
export class AppModule {}
Back end configuration
PreviousHow to Setup WebMap Applications To Run Over SubDomains or WebApplications In IISNextUpdate to Angular 16
Last updated
Was this helpful?