Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hugocruzlfc/nestjs-fundamentals-course
Official Nestjs Course!
https://github.com/hugocruzlfc/nestjs-fundamentals-course
backend-api nestjs typeorm typescript
Last synced: about 12 hours ago
JSON representation
Official Nestjs Course!
- Host: GitHub
- URL: https://github.com/hugocruzlfc/nestjs-fundamentals-course
- Owner: hugocruzlfc
- Created: 2024-02-16T13:12:59.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-02-27T17:26:00.000Z (11 months ago)
- Last Synced: 2024-02-27T19:04:21.512Z (11 months ago)
- Topics: backend-api, nestjs, typeorm, typescript
- Language: TypeScript
- Homepage:
- Size: 363 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest
A progressive Node.js framework for building efficient and scalable server-side applications.
## Description
[Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
## Installation
```bash
$ npm install
```## Running the app
```bash
# development
$ npm run start# watch mode
$ npm run start:dev# production mode
$ npm run start:prod
```## Test
```bash
# unit tests
$ npm run test# e2e tests
$ npm run test:e2e# test coverage
$ npm run test:cov
```## Notes on the project
### commands
```bash
nest g co modules/abc --dry-run
```### For Validate Pipes
```bash
npm i class-validator class-transformer
```### For extend class with PartialType
```bash
npm i @nestjs/mapped-types
```### Add TYPEORM
```bash
npm install @nestjs/typeorm typeorm pg
```### Create the migration
```bash
npx typeorm migration:create src/migrations/CoffeeRefactor
```### Run the migration
```bash
npx typeorm migration:run -d dist/typeorm-cli.config
```### Revert the migration
```bash
npx typeorm migration:revert -d dist/typeorm-cli.config
```### Generate the migration
```bash
npx typeorm migration:create src/migrations/SchemaSync -d dist/typeorm-cli.config
```### Generate filter
```bash
nest g filter common/filters/http-exception
```### Generate guard
```bash
nest g guard common/guards/api-key
```### Generate interceptor
```bash
nest g interceptor common/interceptors/transform
```### Generate pipe
```bash
nest g pipe common/pipes/parse-int
```### Generate middleware
```bash
nest g middleware common/middlewares/logging
```### Adding Swagger
```bash
npm install @nestjs/swagger swagger-ui-express
```add in nest-cli.json "compilerOptions": {
"plugins": ["@nestjs/swagger/plugin"]
}