TypeORM Models and Validation 👨‍💻 Develop an App from Scratch (Part 3)

Описание к видео TypeORM Models and Validation 👨‍💻 Develop an App from Scratch (Part 3)

In this video I start working on the server which is a NodeJS application written in TypeScript. I made the decision to use PostgreSQL as the DBMS and TypeORM because of its excellent TypeScript syntax. In the video, I define models for the User, Budget, CategoryBudget, Category and Transaction entities. I implement validation with the class-validator library that allows validating a class with TypeScript decorators using validator.js in the background. For the user model I implement password hashing with salt using bcrypt that works seamlessly in the model on save/update and the user model includes a method to validate the user password.

Repository:
bw-backend-service: https://github.com/nikelaz/bw-backend...

Contents:
0:00 Introduction
0:22 Entity Architecture Changes
8:15 Why PostgreSQL Instead of MongoDB
13:28 Node/TypeScript Project Setup
17:45 PostgreSQL Docker Container Setup
24:22 Install and Setup TypeORM
31:00 User Entity Model
34:48 Validation with class-validator
49:48 Manual Testing of the User Model
53:43 Validation Hooks
1:01:07 Password Hashing with bcrypt
1:09:19 Transaction Entity Model
1:13:47 Budget Entity Model
1:15:01 CategoryBudget Entity Model
1:15:50 Category Entity Model
1:21:33 Defining the Entity Relationships
1:29:30 Conclusion

Social Media:
Email: [email protected]
Twitter:   / nikelaz  
LinkedIn:   / nikola-lazarov  

#project #application #models

Комментарии

Информация по комментариям в разработке