@metapic/nestjs-utils
v1.0.3
Published
Utilities and helpers for Nest.js + TypeORM.
Downloads
320
Readme
nestjs-utils
Utility helpers for Nest.js projects. Comes with opinionated defaults for TypeORM, Swagger and serialisation:
- Symbols (e.g. DTO property names) always camelCase.
- API JSON payload property names always snake_case.
- Database column names always snake_case.
See the example app for a fully wired showcase of all features.
Important: Serialisation uses class-transformer/class-validator (see Nest.js docs). You can use the following helpers for easy setup (see also example/src/app.module.ts)
import { Module } from '@nestjs/common'
import { SERIALIZATION_INTERCEPTOR, VALIDATION_PIPE } from '@metapic/nestjs-utils'
@Module({
providers: [SERIALIZATION_INTERCEPTOR, VALIDATION_PIPE],
})
export class AppModule {}Testing
All testing runs through the example app’s e2e suite: example/test.
