This API Rest presents a product server for an ecommerce using PostgreSQL database relationships.
Clone this repository
git clone https://github.com/baguilar6174/nest-store-server.git
Install dependencies
$ yarn
You need Nest CLI
$ npm i -g @nestjs/cli
Configure and start Database (in the root project)
docker-compose up -d
Clone .env.template
file and rename to .env
Complete environment variables
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
Populate DB (users and products)
http://localhost:300/api/v1/seed
You can find all endpoints here:
Swagger documentation
http://localhost:3000/api
Swagger documentation |
![]() |
Also you can use Postman Collention
- Nest JS
- Typescript
- PostgreSQL
- TypeORM
- Nest with TypeScript
- Restful APIS with PostgreSQL
- TypeORM
- Create and using Constrains
- Data validations and types
- Nest core building blocks
- Services
- Controllers
- Providers
- Decorators
- Gateways
- Guards
- Interceptors
- Exception Filters
- Modules
- DTOs (Data Transfer Object)
- Entities and TypeORM decorators
- Class Validator
- Class Transformer
- Results pagination
- Tables relationships (one to many | many to one)
- Query Runner
- Query Builder
- Transactions
- Commits and rollbacks
- Using File System
- Authentication
- Authorization
- Json Web Tokens
- Password Hash
- Nest Passport
- Protect endpoints
- Custom Method Decorators
- Custom Class Decorators
- Custom Property Decorators
- Using Tokens
- Postman documentation
- Nest Swagger
- Use plainToInstance to return a entity with custom fields
- Use constants (delete magic strings)
- Api documentation (using Swagger decorators)
- Refresh token endpoint
- Timestamps in entities
- Website - www.bryan-aguilar.com
- Medium - baguilar6174
- LinkeIn - baguilar6174