-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
78 changed files
with
2,686 additions
and
926 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
test/features/app-globalPrefix-version-uri/nestia.config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { INestiaConfig } from "@nestia/sdk"; | ||
|
||
import { Backend } from "./src/Backend"; | ||
|
||
export const NESTIA_CONFIG: INestiaConfig = { | ||
input: () => new Backend().application.get(), | ||
output: "src/api", | ||
e2e: "src/test", | ||
swagger: { | ||
output: "swagger.json", | ||
security: { | ||
bearer: { | ||
type: "apiKey", | ||
}, | ||
}, | ||
}, | ||
}; | ||
export default NESTIA_CONFIG; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { INestApplication, VersioningType } from "@nestjs/common"; | ||
import { NestFactory } from "@nestjs/core"; | ||
import { Singleton } from "tstl"; | ||
|
||
import { ApplicationModule } from "./modules/ApplicationModule"; | ||
|
||
export class Backend { | ||
public readonly application: Singleton<Promise<INestApplication>> = | ||
new Singleton(async () => { | ||
const app = await NestFactory.create(ApplicationModule); | ||
app.setGlobalPrefix("api/internal"); | ||
app.enableVersioning({ | ||
type: VersioningType.URI, | ||
prefix: "v", | ||
}); | ||
return app; | ||
}); | ||
|
||
public async open(): Promise<void> { | ||
return (await this.application.get()).listen(37_000); | ||
} | ||
|
||
public async close(): Promise<void> { | ||
return (await this.application.get()).close(); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
test/features/app-globalPrefix-version-uri/src/api/HttpError.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { HttpError } from "@nestia/fetcher"; |
1 change: 1 addition & 0 deletions
1
test/features/app-globalPrefix-version-uri/src/api/IConnection.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type { IConnection } from "@nestia/fetcher"; |
1 change: 1 addition & 0 deletions
1
test/features/app-globalPrefix-version-uri/src/api/Primitive.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export type { Primitive } from "@nestia/fetcher"; |
7 changes: 7 additions & 0 deletions
7
test/features/app-globalPrefix-version-uri/src/api/functional/api/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** | ||
* @packageDocumentation | ||
* @module api.functional.api | ||
* @nestia Generated by Nestia - https://github.com/samchon/nestia | ||
*/ | ||
//================================================================ | ||
export * as internal from "./internal"; |
Oops, something went wrong.