-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add all cases that the lib should act in
- Loading branch information
1 parent
bffa2c5
commit 2b23c2e
Showing
2 changed files
with
17 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
import { NestFactory } from '@nestjs/core'; | ||
import type { NestExpressApplication } from '@nestjs/platform-express'; | ||
import { FastifyAdapter } from '@nestjs/platform-fastify'; | ||
import { AppModule } from './app.module'; | ||
|
||
async function bootstrap() { | ||
const app = await NestFactory.create<NestExpressApplication>(AppModule); | ||
// Use case 1: default adapter, default options | ||
const app = await NestFactory.create(AppModule); | ||
|
||
// Use case 2: custom adapter, default options | ||
// const app = await NestFactory.create(AppModule, new FastifyAdapter()); | ||
|
||
// Use case 3: default adatper, custom options | ||
// const app = await NestFactory.create(AppModule, { logger: ['debug'] }); | ||
|
||
// Use case 4: custom adatper, custom options | ||
// const app = await NestFactory.create(AppModule, new FastifyAdapter(), { logger: ['debug'] }); | ||
|
||
await app.listen(process.env.PORT || 3000); | ||
} | ||
bootstrap(); | ||
bootstrap(); |