add env variable (#513)

This commit is contained in:
Philip Okugbe
2024-11-28 18:48:25 +00:00
committed by GitHub
parent 8349d8271c
commit d97baf5824
7 changed files with 23 additions and 6 deletions

View File

@ -122,6 +122,10 @@ export class EnvironmentService {
return this.configService.get<string>('POSTMARK_TOKEN');
}
getDrawioUrl(): string {
return this.configService.get<string>('DRAWIO_URL');
}
isCloud(): boolean {
const cloudConfig = this.configService
.get<string>('CLOUD', 'false')

View File

@ -33,7 +33,8 @@ export class StaticModule implements OnModuleInit {
ENV: this.environmentService.getNodeEnv(),
APP_URL: this.environmentService.getAppUrl(),
IS_CLOUD: this.environmentService.isCloud(),
FILE_UPLOAD_SIZE_LIMIT: this.environmentService.getFileUploadSizeLimit()
FILE_UPLOAD_SIZE_LIMIT: this.environmentService.getFileUploadSizeLimit(),
DRAWIO_URL: this.environmentService.getDrawioUrl()
};
const windowScriptContent = `<script>window.CONFIG=${JSON.stringify(configString)};</script>`;