Skip to content

Commit 8ca7f4f

Browse files
jbl428imdudu1
andcommitted
feat: add http interface module
Co-authored-by: imdudu1 <[email protected]>
1 parent 8e92919 commit 8ca7f4f

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.eslintrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ rules:
2222
},
2323
},
2424
]
25+
'@typescript-eslint/no-extraneous-class': 0

lib/http-interface.module.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { type DynamicModule } from "@nestjs/common";
2+
import { DiscoveryModule } from "@nestjs/core";
3+
4+
export interface HttpInterfaceConfig {
5+
timeout?: number;
6+
}
7+
8+
export class HttpInterfaceModule {
9+
static register(config: HttpInterfaceConfig): DynamicModule {
10+
return {
11+
imports: [DiscoveryModule],
12+
module: HttpInterfaceModule,
13+
providers: [],
14+
};
15+
}
16+
}

lib/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "./nest-http-interface.module";
1+
export * from "./http-interface.module";

lib/nest-http-interface.module.ts

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)