NestJs Course for Beginners - Create a REST API

1,229,308
0
Published 2022-02-22
Learn NestJs by building a CRUD REST API with end-to-end tests using modern web development techniques. NestJs is a rapidly growing node js framework that helps build scalable and maintainable backend applications.

In this course, we build a bookmarks API from scratch using nestJs, docker, postgres, passport js, prisma, pactum and dotenv.

💻 Code: github.com/vladwulf/nestjs-api-tutorial

✏️ Course from Vladimir Agaev. Check out his YouTube channel:    / @codewithvlad  

⭐️ Course Contents ⭐
⌨️ (0:00:00) Course introduction
⌨️ (0:01:15) What is NestJs
⌨️ (0:02:35) Why using NestJs
⌨️ (0:03:35) What we are building
⌨️ (0:03:55) NestJs project setup
⌨️ (0:05:55) Modules
⌨️ (0:15:30) Auth module
⌨️ (0:19:50) Dependency injection
⌨️ (0:20:30) Auth controller
⌨️ (0:26:50) Setting up postgres in docker
⌨️ (0:29:10) Setting up prisma
⌨️ (0:32:10) User & bookmark models
⌨️ (0:35:50) Running prisma migrations
⌨️ (0:40:10) Prisma module
⌨️ (0:52:10) Using auth dtos
⌨️ (0:57:45) NestJs pipes
⌨️ (0:59:10) NestJs global pipe
⌨️ (1:02:50) Hashing user password with argon
⌨️ (1:03:20) Sign up logic
⌨️ (1:13:13) Sign in logic
⌨️ (1:16:50) Automate postgres restart & prisma migrations
⌨️ (1:27:40) NestJs config module
⌨️ (1:34:40) Using passport js & jwt module with nestJs
⌨️ (1:55:10) Get current user with access token
⌨️ (1:57:00) NestJs Guards
⌨️ (2:12:10) NestJs custom param decorator
⌨️ (2:27:10) e2e tests with pactumJs
⌨️ (2:35:10) Setting up test database
⌨️ (2:36:10) Automate test database restart & migrations
⌨️ (2:37:10) Using dotenv cli with prisma
⌨️ (2:44:30) Prisma database teardown logic
⌨️ (2:53:10) Auth e2e tests
⌨️ (3:02:01) User e2e tests
⌨️ (3:13:20) Bookmarks e2e test

🎉 Thanks to our Champion and Sponsor supporters:
👾 Raymond Odero
👾 Agustín Kussrow
👾 aldo ferretti
👾 Otis Morgan
👾 DeezMaster

--

Learn to code for free and get a developer job: www.freecodecamp.org/

Read hundreds of articles on programming: freecodecamp.org/news

All Comments (21)
  • @CodeWithVlad
    Thank you Beau! I really enjoyed making this course, I hope that it will be helpful to anyone who wants to learn about NestJs! 😊
  • @ciferr1032
    Where tf does youtube take me when I fall asleep
  • For Windows users, instead of sleep 1 put node -e \"setTimeout(()=>{}, 1000)\" on your package.json PD: Thanks Vlad, one of the best courses I've seen 💯
  • I just switched from Rust/Axum to TS/NestJS. The developer experience with TS and NestJS is hands down beautiful.
  • @khoinguyenvu8091
    Never self-code API Backend but with only first time to watch your video, i understand many thing about it. Thank you very much!
  • @alexlun4464
    Dude... you're a fantastic teacher. Hands-on approach is the only thing that works for me. The only time I really soak in information is when I apply it in practice. Thank you so much for this easy-to-follow tutorial. If you're a viewer finding this tutorial hard, don't despair. Many of us have a background in another backend framework (Ruby on Rails in my case) so we are very familiar with many concepts talked here. Just keep practicing until it sticks with you, we were all in your shoes once so you'll get there too.
  • @petarp3938
    At 1:12 / 1:13, you will now probably have to replace "error instanceof PrismaClientKnownRequestError" with "error instanceof Prisma.PrismaClientKnownRequestError" and do "import { Prisma } from '@prisma/client'"
  • @saman6199
    Everything about this tutorial was more than perfect, the walkthrough, detailed explanation and also the test environment setup, thanks for your hard work, much appreciate it.
  • @TheFern2
    This is one of the first fcc videos, that I watch from beginning to end. The instructor was just amazing and I learned tons of tricks along the way. I usually code api's at work with fastapi, but nestjs is a nice weapon for my arsenal. Thank you Vlad!
  • @marckraw
    This is totally amazing. All the other tutorials touches only on some very basic stuff, and this is full proof stuff with test and all that! Really amazing job!
  • @donang6157
    Spent a long time searching for a good guide on using nestjs with Prisma and gotta say this is an amazing guide that came out at the right time.
  • @Beyram1501
    It is safe to say that I've never watched a better tutorial and I'm not even exaggerating. NestJS is amazing and explained by you seems even more amazing. wow, hope you have a udemy account so I can follow and purchase more of your courses.
  • @solyaridz389
    if you have hard time with docker like i did. Then run: docker pull postgres and chane postges-13 to postgres:latest in docker-compose
  • @jolyonblazey
    Fantastic training by building an app while you watch, and explaining why stuff is important, but moving on quickly, such a broad coverage of different libraries and tools. I have watched it several times. This will be important for my new job. Thanks.
  • @sunn-e
    If you get stuck somewhere, run `npm run build` from terminal. For eg; ValidationPipe issue.
  • What an amazing course! I am a react native developer. Found this tutorial so informative and easy to understand. Very well structured 👌 Would love to work with such developers ❤️
  • @aRTEESTtv
    I listened to around 45 minutes for now, and this seems like a really easy and intuitive way to teach. I read about NestJS and started utilizing it recently, but this video makes my understanding of NestJS really stronger and I appreciate it. You earned yourself another subscriber. :)
  • @siwm6309
    I decided to develop my project with prisma and nest thanks to you. Your course very very clear and comprehensible.
  • @MikeNicklas
    Great tutorial! Needed to write a new API for a side biz and was itching for something new. NestJs is very slick, glad I gave it a try. This is the first time I've felt that same productivity boost of Rails from the early days.