Phase1
This commit is contained in:
16
apps/api/src/config/app-config.module.ts
Normal file
16
apps/api/src/config/app-config.module.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Global, Module } from '@nestjs/common';
|
||||
import { getConfig } from '@hexahost/config';
|
||||
|
||||
import { APP_CONFIG } from './config.constants';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
providers: [
|
||||
{
|
||||
provide: APP_CONFIG,
|
||||
useFactory: () => getConfig(),
|
||||
},
|
||||
],
|
||||
exports: [APP_CONFIG],
|
||||
})
|
||||
export class AppConfigModule {}
|
||||
5
apps/api/src/config/config.constants.ts
Normal file
5
apps/api/src/config/config.constants.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { AppConfig } from '@hexahost/config';
|
||||
|
||||
export const APP_CONFIG = Symbol('APP_CONFIG');
|
||||
|
||||
export type { AppConfig };
|
||||
Reference in New Issue
Block a user