@opra/nestjs-http
Version:
Opra NestJS Http Module
40 lines (39 loc) • 1.21 kB
JavaScript
var OpraHttpModule_1;
import { __decorate } from "tslib";
import { Logger, Module } from '@nestjs/common';
import { OpraHttpCoreModule } from './opra-http-core.module.js';
/**
* OpraHttpModule
*
* Module that integrates OPRA HTTP support into the NestJS application.
*/
let OpraHttpModule = OpraHttpModule_1 = class OpraHttpModule {
/**
* Configures the module synchronously and imports it at the root level.
*
* @param init - Module configuration options.
* @returns {DynamicModule} NestJS dynamic module.
*/
static forRoot(init) {
return {
module: OpraHttpModule_1,
imports: [OpraHttpCoreModule.forRoot(init)],
};
}
/**
* Configures the module asynchronously and imports it at the root level.
*
* @param options - Asynchronous module configuration options.
* @returns {DynamicModule} NestJS dynamic module.
*/
static forRootAsync(options) {
return {
module: OpraHttpModule_1,
imports: [OpraHttpCoreModule.forRootAsync(options)],
};
}
};
OpraHttpModule = OpraHttpModule_1 = __decorate([
Module({})
], OpraHttpModule);
export { OpraHttpModule };