chore(repo): update to nestjs 11 + fastify adapter

This commit is contained in:
Francesco Spilla 2025-02-10 10:15:40 +01:00
parent cc6fe98e20
commit 2735fa4791
3 changed files with 960 additions and 426 deletions

View File

@ -1,10 +1,9 @@
/**
* This is not a production server yet!
* This is only a minimal backend to get started.
*/
import { Logger } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import {
FastifyAdapter,
NestFastifyApplication,
} from '@nestjs/platform-fastify';
import { Logger as PinoLogger } from 'nestjs-pino';
import { AppModule } from './app/app.module';
@ -21,7 +20,10 @@ async function bootstrap() {
...loggerOpts,
};
})();
const app = await NestFactory.create(AppModule, appOpts);
const app = await NestFactory.create<NestFastifyApplication>(
AppModule,
new FastifyAdapter(appOpts)
);
const globalPrefix = 'api';
app.setGlobalPrefix(globalPrefix);

View File

@ -13,13 +13,14 @@
"10": "^0.0.1",
"@autotelic/pino-seq-transport": "^0.1.0",
"@keyv/redis": "^4.2.0",
"@nestjs/common": "^10.0.2",
"@nestjs/common": "^11.0.8",
"@nestjs/config": "^4.0.0",
"@nestjs/core": "^10.0.2",
"@nestjs/platform-express": "^10.0.2",
"@nestjs/core": "^11.0.8",
"@nestjs/platform-express": "^11.0.8",
"@nestjs/platform-fastify": "^11.0.8",
"@nestjs/typeorm": "^11.0.0",
"@nx/devkit": "20.4.1",
"axios": "^1.6.0",
"@nx/devkit": "20.4.2",
"axios": "^1.7.9",
"cacheable": "^1.8.8",
"connection-string": "^4.4.0",
"dayjs": "^1.11.13",
@ -29,48 +30,48 @@
"patch-package": "^8.0.0",
"pino-http": "^10.4.0",
"pino-pretty": "^13.0.0",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.8.0",
"reflect-metadata": "^0.2.2",
"rxjs": "^7.8.1",
"typeorm": "^0.3.20",
"typeorm-scoped": "^1.2.0",
"typeorm-transactional": "^0.5.0",
"zod": "^3.24.1"
},
"devDependencies": {
"@eslint/js": "^9.8.0",
"@nestjs/schematics": "^10.0.1",
"@nestjs/testing": "^10.0.2",
"@nx/eslint": "20.4.1",
"@nx/eslint-plugin": "20.4.1",
"@nx/jest": "20.4.1",
"@nx/js": "20.4.1",
"@nx/nest": "20.4.1",
"@nx/node": "20.4.1",
"@nx/plugin": "20.4.1",
"@nx/web": "20.4.1",
"@nx/webpack": "20.4.1",
"@nx/workspace": "20.4.1",
"@swc-node/register": "~1.9.1",
"@eslint/js": "^9.20.0",
"@nestjs/schematics": "^11.0.0",
"@nestjs/testing": "^11.0.8",
"@nx/eslint": "20.4.2",
"@nx/eslint-plugin": "20.4.2",
"@nx/jest": "20.4.2",
"@nx/js": "20.4.2",
"@nx/nest": "20.4.2",
"@nx/node": "20.4.2",
"@nx/plugin": "20.4.2",
"@nx/web": "20.4.2",
"@nx/webpack": "20.4.2",
"@nx/workspace": "20.4.2",
"@swc-node/register": "~1.10.9",
"@swc/cli": "~0.3.12",
"@swc/core": "~1.5.7",
"@swc/core": "~1.10.15",
"@swc/helpers": "~0.5.11",
"@types/jest": "^29.5.12",
"@types/jest": "^29.5.14",
"@types/lodash": "^4.17.15",
"@types/node": "~18.16.9",
"eslint": "^9.8.0",
"eslint": "^9.20.0",
"eslint-config-prettier": "^9.0.0",
"execa": "5.1.1",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"mssql": "^11.0.1",
"nx": "20.4.1",
"nx": "20.4.2",
"prettier": "^2.6.2",
"ts-jest": "^29.1.0",
"ts-node": "10.9.1",
"tslib": "^2.3.0",
"ts-jest": "^29.2.5",
"ts-node": "10.9.2",
"tslib": "^2.8.1",
"typeorm-model-generator": "0.4.6-no-engines",
"typescript": "~5.7.2",
"typescript-eslint": "^8.19.0",
"typescript": "~5.7.3",
"typescript-eslint": "^8.23.0",
"webpack-cli": "^5.1.4"
}
}

1311
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff