diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 37c359d..5f5d663 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -2,6 +2,7 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { ExtraOptions, PreloadAllModules, RouterModule } from '@angular/router'; +// import { MatIconRegistry, MatIconModule } from '@angular/material/icon'; import { MarkdownModule } from 'ngx-markdown'; import { FuseModule } from '@fuse'; import { FuseConfigModule } from '@fuse/services/config'; @@ -13,6 +14,11 @@ import { LayoutModule } from 'app/layout/layout.module'; import { AppComponent } from 'app/app.component'; import { appRoutes } from 'app/app.routing'; +import { NatsModule } from 'app/core/nats/nats.module'; +import { WebStorageModule } from 'app/core/web-storage/web-storage.module'; + +import { environment } from 'environments/environment'; + import { BankModule } from 'app/modules/polyglot/bank/bank.module'; import { IdentityModule } from 'app/modules/polyglot/identity/identity.module'; import { MemberBankAccountModule } from 'app/modules/polyglot/member_bank_account/member_bank_account.module'; @@ -50,6 +56,21 @@ const routerConfig: ExtraOptions = { // 3rd party modules that require global configuration via forRoot MarkdownModule.forRoot({}), + + NatsModule.forRoot(environment.nats), + WebStorageModule.forRoot({}), + + BankModule.forRoot(), + IdentityModule.forRoot(), + MemberBankAccountModule.forRoot(), + MemberBankDepositModule.forRoot(), + MemberBankWithdrawModule.forRoot(), + MemberClassModule.forRoot(), + MemberLevelModule.forRoot(), + MemberModule.forRoot(), + SiteModule.forRoot(), + + ApiModule.forRoot(), ], bootstrap: [AppComponent], }) diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts index c966979..5a2a8b7 100644 --- a/src/environments/environment.prod.ts +++ b/src/environments/environment.prod.ts @@ -1,3 +1,14 @@ -export const environment = { +import { Environment } from './environment.type'; + +export const environment: Environment = { production: true, + nats: { + connectionOptions: { + servers: ['ws://192.168.50.205:8088'], + // servers: ['ws://192.168.50.200:8088'], + // servers: ['ws://192.168.50.208:8088'], + // servers: ['ws://192.168.0.103:8088'], + // servers: ['ws://30.20.0.149:8088'], + }, + }, }; diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 31cb785..c8cd57b 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -2,8 +2,19 @@ // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. // The list of file replacements can be found in `angular.json`. -export const environment = { +import { Environment } from './environment.type'; + +export const environment: Environment = { production: false, + nats: { + connectionOptions: { + servers: ['ws://192.168.50.205:8088'], + // servers: ['ws://192.168.50.200:8088'], + // servers: ['ws://192.168.50.208:8088'], + // servers: ['ws://192.168.0.103:8088'], + // servers: ['ws://30.20.0.149:8088'], + }, + }, }; /* diff --git a/src/environments/environment.type.ts b/src/environments/environment.type.ts new file mode 100644 index 0000000..fc344ad --- /dev/null +++ b/src/environments/environment.type.ts @@ -0,0 +1,8 @@ +import * as nats from 'nats.ws'; + +export interface Environment { + production: boolean; + nats: { + connectionOptions: nats.ConnectionOptions; + }; +}