nats added

This commit is contained in:
Park Byung Eun 2022-08-18 08:24:24 +00:00
parent 67fc3a7286
commit 077f364700
4 changed files with 53 additions and 2 deletions

View File

@ -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],
})

View File

@ -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'],
},
},
};

View File

@ -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'],
},
},
};
/*

View File

@ -0,0 +1,8 @@
import * as nats from 'nats.ws';
export interface Environment {
production: boolean;
nats: {
connectionOptions: nats.ConnectionOptions;
};
}