localhost_oa_based/src/config/swagger.config.ts

13 lines
349 B
TypeScript
Raw Normal View History

2024-02-28 08:32:35 +08:00
import { ConfigType, registerAs } from '@nestjs/config'
import { env, envBoolean } from '~/global/env'
export const swaggerRegToken = 'swagger'
export const SwaggerConfig = registerAs(swaggerRegToken, () => ({
enable: envBoolean('SWAGGER_ENABLE'),
path: env('SWAGGER_PATH'),
}))
export type ISwaggerConfig = ConfigType<typeof SwaggerConfig>