NestJS Crash Course: Everything you need to know! | NodeJS Tutorial 2023

Sdílet
Vložit
  • čas přidán 28. 07. 2024
  • In this video I walk you through a crash course of one the best Node.js frameworks: NestJS!
    If you're completely new to Nest and are looking to understand the fundamentals, this is for you!
    Topics covered include:
    - Starting a project
    - CRUD
    - Modules, controllers, services, pipes
    - Using the CLI to generate everything
    - Request body, query params, url params
    - Validation (class-validator)
    - 3-layer architecture and dependency injection
    - Swagger (Open API) documentation ... and more!
    00:00 - Intro
    00:23 - Topics we’ll cover
    01:36 - Starting a new project
    04:38 - 3 Layer architecture
    07:40 - Configuring endpoints
    09:40 - Creating a new module
    13:20 - Parsing URL params
    16:18 - Dependency Injection
    22:55 - Body parsing, DTOs, and entities
    29:13 - Puppy
    29:46 - Swagger OpenAPI Docs
    40:35 - Parsing query parameters
    45:30 - Exception and error handling
    50:11 - Pipes intro
    52:45 - Validation
    59:13 - Using the CLI to generate CRUD
    01:02:30 - Quick intro to Guards, Interceptors, Middleware
    01:04:25 - Conclusion
    01:05:12 - Outro

Komentáře • 356

  • @mariusespejo
    @mariusespejo  Před 3 lety +43

    Timestamps added so you can jump around and skip the boring parts!
    00:00 - Intro
    00:23 - Topics we’ll cover
    01:36 - Starting a new project
    04:38 - 3 Layer architecture
    07:40 - Configuring endpoints
    09:40 - Creating a new module
    13:20 - Parsing URL params
    16:18 - Dependency Injection
    22:55 - Body parsing, DTOs, and entities
    29:13 - Puppy
    29:46 - Swagger OpenAPI Docs
    40:35 - Parsing query parameters
    45:30 - Exception and error handling
    50:11 - Pipes intro
    52:45 - Validation
    59:13 - Using the CLI to generate CRUD
    01:02:30 - Quick intro to Guards, Interceptors, Middleware
    01:04:25 - Conclusion
    01:05:12 - Outro

    • @MarkEdwardTan
      @MarkEdwardTan Před 2 lety +1

      Thanks Marius. How did you do the animation when typing in the terminal? Is it in iTerm settings? Thanks

    • @mariusespejo
      @mariusespejo  Před 2 lety +2

      That was using hyper terminal, it’s just one of the plugins. It’s a pretty hackable terminal, check it out!

    • @MarkEdwardTan
      @MarkEdwardTan Před 2 lety

      @@mariusespejo Thank you. I'm fond of customizing different things and was surprised that I didn't know this. Will share your channel to my friends and colleagues. Wish that your channel will be big in no time. Salamat po Lodi :)

    • @krishnamandava9919
      @krishnamandava9919 Před 2 lety

      Can you male a video on nest js refresh token?

    • @mariusespejo
      @mariusespejo  Před rokem

      Dto = data transfer object, which really could be anything. It’s just meant to represent any data that’s being passed around
      Entities you can think of as Dto that is specifically representing the shape of your database tables, like if you’re using an ORM

  • @bartoszpierdolny6978
    @bartoszpierdolny6978 Před 3 lety +50

    Love how you pay attention to details by zooming, darkin temporarily unnecessary parts of the video etc. Thanks, keep it up!

    • @mariusespejo
      @mariusespejo  Před 3 lety +9

      thanks Bartosz! I’m glad you mentioned that, it adds a lot of time to the editing process but I’m hoping it increases clarity and focus

    • @bartoszpierdolny6978
      @bartoszpierdolny6978 Před 3 lety

      @@mariusespejo It's hard not to mention that, because it's really helpful!

    • @pranavyeole102
      @pranavyeole102 Před 2 lety

      Yes. It is really very useful. Thanks for taking the time to do that.

  • @timothymm
    @timothymm Před 3 lety +26

    New favorite teacher. I like that you are straight forward, and no fluff. Just getting to the meat. Awesome work!

  • @SafaKadir
    @SafaKadir Před rokem +1

    Great video! Not idling around what very basic tutorials repeatatively had and teaching real concepts which an experienced programmer new to nestjs would need. Thanks!

  • @parasarora5869
    @parasarora5869 Před 2 lety +2

    Totally awesome video. Loved it, and finally feeling confident to use nestjs. Also loving the features of nestjs. I was looking for a more structured alternative of expressjs.

  • @martinmtandi335
    @martinmtandi335 Před 3 lety +3

    hah my guy, thank you for coming through for me. You are awesome. I remember asking for such a tutorial on one of your previous videos

  • @yaserkapo
    @yaserkapo Před rokem

    Man, it's one of the best videos that i've ever seen. Thank you very much, i'm going to see the other NestJS videos from you 🤙

  • @technoparty123
    @technoparty123 Před 2 lety +1

    Really appreciate the video! This is one of the most clear and quick introduction I have ever seen about this framework.

    • @mariusespejo
      @mariusespejo  Před 2 lety +1

      Thanks! I’m glad you think so! I’ve got a couple more Nest content in the channel if you’re interested

  • @rumble1925
    @rumble1925 Před 3 lety +1

    Great tutorial! Covered all the important topics.
    I came across your channel when I was looking into AdonisJS but with this I feel a lot more confident using a less opinionated framework

    • @mariusespejo
      @mariusespejo  Před 3 lety +1

      I am clearly biased but Nest is great 😄 I do plan on probably making some more content for adonis soon, since my one video about it was when v5 was still in preview. v5 has been released since then

  • @PingNattawoot
    @PingNattawoot Před 2 lety +7

    I really like the way you teach. You have set up this sequence perfectly! I understand everything that you've tried to say. Keep going, bro!!

    • @mariusespejo
      @mariusespejo  Před 2 lety +1

      Thank you Nattawoot! Definitely looking to grow my channel’s content, and I’m glad you are liking the teaching style!

  • @swedishmichaell7369
    @swedishmichaell7369 Před 2 lety +1

    Great video! Very useful serie for my dive into NestJS! Thanks a lot!

  • @ateebahmed2237
    @ateebahmed2237 Před 3 lety +8

    Hey, this is the most comprehensive lecture on NestJs.
    Thanks my man.

    • @mariusespejo
      @mariusespejo  Před 3 lety +1

      thanks for the feedback Ateeb, glad it’s helpful!

  • @dmwright
    @dmwright Před 2 lety +1

    This is great, thank you! I love how you explain what everything is doing as you go along, often things are brushed over in videos and online tutorials and you never really understand what some things are doing. I am about to embark on a new API for an application so onto the typeORM video next for me :)

    • @mariusespejo
      @mariusespejo  Před 2 lety +1

      thanks Dean!! I appreciate your feedback, good luck on your project!

  • @lucisetumbrae
    @lucisetumbrae Před 2 lety +1

    Superb review of fundamentals. I filled in some crucial gaps in my Nestjs knowledge.

  • @safaesafae6072
    @safaesafae6072 Před 2 lety

    This video is amazing, thank you for such fabulous explanation.

  • @MarkEdwardTan
    @MarkEdwardTan Před 2 lety +2

    Automatically subscribed because he explained it well and added timelines in the video. Other CZcamsrs are lazy and don't add timelines.

  • @sachasmart7139
    @sachasmart7139 Před 2 lety

    Your tutorials are incredible. Thank you

  • @TheExcelias
    @TheExcelias Před 3 lety +11

    Man this video is real stuff. I was looking for a framework to switch my backend from Java Spring to Nest because I use Angular in front-end and it's so enjoyable to have the same language and structure between front and back. Your video helped me a lot ! All the fundamentals in one hour it's just amazing. Thanks a lot man !

    • @mariusespejo
      @mariusespejo  Před 3 lety

      it actually takes a lot of inspiration from spring and angular from my understanding, sounds like a good fit for you!

    • @rosszhu1660
      @rosszhu1660 Před 2 lety

      Yeah, I am also an Angular developer. This makes me feel at home ^_^ Have been using Express for years, now I think it's the time to make some changes.

  • @JayLee9000
    @JayLee9000 Před 2 lety +2

    Thank you so much for this video. I found it very easy to follow along and you do a great job of explaining this complex framework in a way that makes sense

    • @mariusespejo
      @mariusespejo  Před 2 lety

      Thank you for the feedback! I’m glad it was helpful for you!

  • @muhannad.q
    @muhannad.q Před 3 lety +10

    I normally don't comment on videos, but people who haven't discovered this channel are missing out, this video has clarified some important concepts I was struggling with.
    Keep up the good work.

    • @mariusespejo
      @mariusespejo  Před 3 lety

      Glad it’s helpful, thanks for taking the time to provide feedback 🙏

  • @timchen1975
    @timchen1975 Před 2 lety

    thanks, this brief introduction is awesome and clear

  • @elshir
    @elshir Před 3 lety

    Best nest.js tutorial so far, subscribed bro, keep up your great work!

  • @thongtech1984
    @thongtech1984 Před 2 lety +1

    You are so awesome my friend, i have been working with Nestjs for sometime but still learn alot even from this Video. Very well done, you deserve my full respect and graceful

  • @MultiUnitPros
    @MultiUnitPros Před 3 lety +3

    Great job. Nice tempo and explanation throughout the tutorial!

  • @hkd135
    @hkd135 Před 3 lety +1

    I love this tutorial, to the point and full of basic information that useful. Thank you Pak.

    • @mariusespejo
      @mariusespejo  Před 3 lety +1

      thanks for the feedback, glad you like it!

  • @tikthetok6198
    @tikthetok6198 Před 24 dny

    I wish I could like this video more than once. Thank you so much.❤

  • @lavanyam3224
    @lavanyam3224 Před 3 lety

    This is prolly the best nestjs video! You're a life saver man! I gotta learn nest.js and typeorm for my internship and you've covered exactly what I wanted. Thanks a lot :) I owe u a coffee xD

    • @mariusespejo
      @mariusespejo  Před 3 lety

      haha good to hear, good luck on your internship!

  • @josephbandawe8722
    @josephbandawe8722 Před 2 lety

    Thanks man. I learnt a lot from your channel. You are a real inspiration...

  • @eiderantonioarangoamaya8475

    Thanks bro, your channel is awesome. Keep it up.

  • @kevinelfering4111
    @kevinelfering4111 Před 3 lety +1

    Keep up the good work, very helpful and I like the format!

  • @P4trickSensei
    @P4trickSensei Před 2 lety

    Very well structured and explained! You're the man.

  • @sampathbalivada-personal

    That was a super cool Tutorial. Thanks Marius. Really appreciate the effort you put in.

  • @emF3lipe
    @emF3lipe Před 3 lety +2

    Amazing video, you're going to be big :)

  • @sifatulrabbi
    @sifatulrabbi Před 2 lety

    A birds-eye view of NestJS also a crash course. Learned a lot only in an hour. I really like your videos

  • @hasst9261
    @hasst9261 Před 3 měsíci

    I am glad I found your channel

  • @emmanuelcbenson
    @emmanuelcbenson Před 2 lety

    Awesome crash course. Thank you.

  • @tanishpanjwani3117
    @tanishpanjwani3117 Před 2 lety

    This was very helpful. Thank you!

  • @wisnusaputro88
    @wisnusaputro88 Před 3 lety

    Making NestJS and sequelize video tutorials is definitely fun, your explanation is simple and easy to understand.

    • @mariusespejo
      @mariusespejo  Před 3 lety +1

      I’m glad you like the content! 🙏 thanks!

  • @MuhammadMamooji
    @MuhammadMamooji Před rokem

    Great video brother! Really apricate you for this video!

  • @nitipatthanaborvornwiwat4196

    Great video, I learn a lot from your course. Thank you so much.

  • @enfieldli9296
    @enfieldli9296 Před 2 lety

    Really good stuff! Help out understanding basics extremly well

  • @adrientheus6167
    @adrientheus6167 Před rokem

    Incredible Job ! Thanks a lot man 👍

  • @namangarg3933
    @namangarg3933 Před 2 lety

    Awesome explanation Marius.
    Please keep up the good work.

  • @alexandermarthius5593
    @alexandermarthius5593 Před 3 lety

    Great tutorial Marius! keep it up

  • @minhtri48
    @minhtri48 Před 2 lety

    Thank you so much for this course. Very clear and useful for me.

  • @timetolive4869
    @timetolive4869 Před 2 lety

    Amazing tutorial, thank you!

  • @salmakhaled500
    @salmakhaled500 Před 6 měsíci

    Great, man
    keep posting good content like this

  • @Alex-bc3xe
    @Alex-bc3xe Před rokem

    nice really straight forward on point.

  • @rhitmanandhar525
    @rhitmanandhar525 Před 2 lety

    best nestjs video. Earned a new sub.

  • @cakeyummy6147
    @cakeyummy6147 Před rokem

    Thanks for the nice crash course, it makes me more confident to move Laravel to Nestjs.

  • @muawallaceewi8410
    @muawallaceewi8410 Před 2 lety

    An amazing explanation sir, thanks for this video

  • @MinDinTub
    @MinDinTub Před 3 lety

    Great stuff and great format, thank you!

  • @manojkumarrajendran4289

    Ultimate explanation. Loved it!

  • @robdev89
    @robdev89 Před 2 lety +1

    Awesome content, thanks a lot for this. I think I have just fallen in love with NestJS. This will make building APIs a breeze! ;-)

    • @mariusespejo
      @mariusespejo  Před 2 lety

      Thanks! I’ve tried a lot of node frameworks and this is still my top choice at the moment

  • @hanzheng173
    @hanzheng173 Před 3 lety

    Thanks for your video. I learned a lot from it.

  • @snowsant2843
    @snowsant2843 Před 3 lety

    Thanks, awesome explanation🔥.
    I should try nestJs for my next project.

  • @___GM___
    @___GM___ Před 3 lety +1

    I was skeptical about nest. Now, after watching your video, I am going to user in my next project.

    • @mariusespejo
      @mariusespejo  Před 3 lety +1

      glad to hear! It’s definitely in my opinion at least worth a try, it’s bound to save you time. Specially if you want to write your server in TS, I don’t think there’s a better way (in my opinion at the moment)

  • @aranabdi5683
    @aranabdi5683 Před 2 lety

    Fantastic!!!

  • @yanhaixiang
    @yanhaixiang Před 3 lety

    Thanks for the great crash course! Thumb and subscribed!

  • @chrisplacktor1992
    @chrisplacktor1992 Před 2 lety

    Best Video on Nest Js... I just started a new role on Nest and this video has given me a lot about that. I could start assuming that role confidently

  • @changxu9774
    @changxu9774 Před 2 lety

    so great, help me a lot, thank you

  • @muhammadmuzakkirazad1273

    Really appreciate the effort
    The way of explaining is superb.

  • @deFrontComOFer
    @deFrontComOFer Před rokem

    thank you very much, you´re a nice teacher, i learned a lot with you !!!!!!!!

  • @codewithmarwan
    @codewithmarwan Před rokem

    very good explanation, thanks alot

  •  Před 3 lety

    Great video. Good topic. Please continue.

  • @rehanshah2247
    @rehanshah2247 Před rokem

    Great. Video. I watched it at one shot.... pretty interesting ⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️⭐️

  • @snnkuuu9765
    @snnkuuu9765 Před 2 lety

    keep spirit, thank you for teaching me.

  • @martinmtandi335
    @martinmtandi335 Před 3 lety +1

    I liked before I watched :)

  • @mineturtle1841
    @mineturtle1841 Před 2 lety

    well presented, thank you

  • @RiderTV01
    @RiderTV01 Před 2 lety

    A great tutorial!

  • @gustavofigueroahuaman71

    Excelente información! Gracias,🤘
    Tienes un nuevo suscriptor
    From Perú 🤩🤩

  • @TheZazatv
    @TheZazatv Před 2 lety

    Thank you so much sir!

  • @GustavoScarpellini
    @GustavoScarpellini Před 2 lety

    damn bro, that was a nice. Thanks for the video

  • @FatherPhi
    @FatherPhi Před 3 lety +1

    You're the GOAT!!!

  • @AmitKumar-li4uy
    @AmitKumar-li4uy Před 2 lety +1

    Thanks man , good tutorial 🤝

  • @philipp332
    @philipp332 Před 3 lety

    Thanks helped me a lot

  • @balajichandrasekar7074

    Worthy content ! 👍🏻

  • @MultiShokk69
    @MultiShokk69 Před 2 lety

    Awesome, thank you for all your video you are a great teacher

  • @tenzinlehpel1263
    @tenzinlehpel1263 Před 3 lety +1

    clean tutorial.. love your background Music ;) more content node js Express

    • @mariusespejo
      @mariusespejo  Před 3 lety +1

      thanks! anything specific about node/express you were looking for?

  • @montionugera
    @montionugera Před 3 lety

    Nice tutorial 👍

  • @hankim1083
    @hankim1083 Před 3 lety

    This helped alot! Thank you!

  • @gabrielsoloman5000
    @gabrielsoloman5000 Před 2 lety

    excellent content, bro.
    17:23 i think it was a good pragmatical explanation of dependency injection, btw i think you made good decision on when not to dig a lot and recommend reading about it (being topics of their own)

    • @mariusespejo
      @mariusespejo  Před 2 lety +1

      I appreciate you feedback!! Yeah it’s a balance, if I go too deep right away I fear it will bore people. But also because I’d like to cover some of those topics in better detail in their own videos!

  • @TienPham-ms5wb
    @TienPham-ms5wb Před 2 lety

    Thank you!

  • @aradbs
    @aradbs Před rokem

    that was great thanks

  • @asharma741
    @asharma741 Před 2 lety

    It's really good course, Awesome!

  • @DaniloMongelli
    @DaniloMongelli Před 3 lety

    Awesome crash course man!

  • @RommelParungao
    @RommelParungao Před 2 lety

    I've learned a lot from this video, you've covered the important parts to start my own project and it is really easy to follow. One small comment from me is you speak a little slow, and personally, it makes me kind of sleepy, I just changed the speed to 1.25 and you are golden. haha! Thank you and keep it up!

    • @mariusespejo
      @mariusespejo  Před 2 lety +1

      Hahah thanks for honest feedback! This is one of my earlier videos and I have been trying to kinda improve pacing and tone. Definitely still trying to find that right balance.
      If you get a chance to watch some of my newer stuff I hope it’s a little better lol

  • @Deepz007
    @Deepz007 Před 2 lety

    thank you!

  • @hoard1000
    @hoard1000 Před 3 lety

    Great video..

  • @mdshajahan6314
    @mdshajahan6314 Před rokem

    very well definitation

  • @eveemoodley
    @eveemoodley Před 2 lety

    Good job.

  • @akhileshway9076
    @akhileshway9076 Před rokem

    Thank you for the good video

  • @sollano123able
    @sollano123able Před 3 lety +1

    Yo man, you're a big help on my nodejs journey! thumbs up!
    but just a quick question, how do you usually structure your files or folders in nestjs?

    • @mariusespejo
      @mariusespejo  Před 3 lety

      hey Mark, glad to hear that! Regarding folder structure, in Nest if you utilize the CLI to generate your files you’ll notice that files tend to revolve around modules. This generally means that things that are defined within a specific module, likely should be organized in the same folder. For example a users folder would have a users module, users controller, users service etc. So I guess you could imagine things being grouped by feature/domain if that makes sense.
      I personally like to follow that convention that the CLI already promotes since I myself use the CLI often to generate new files. Hope that helps!

  • @softwarecitadel
    @softwarecitadel Před 2 lety

    Nice job !

  • @SemenAlexndrovich
    @SemenAlexndrovich Před 2 lety

    Thank you so much! I'm not english native speaker, but I can understand everything you say, and that's great

  • @constWardtz
    @constWardtz Před rokem

    more tutorials to come!

  • @mayurteli91
    @mayurteli91 Před 3 lety

    Thank you brother for the tutorial

  • @yayyarc
    @yayyarc Před 2 lety

    Thanks, that’s great, If you have time, pls make gRPC course ❤️

  • @mischatettenborn715
    @mischatettenborn715 Před 8 měsíci

    Thanks! :)

  • @mr_ehmed
    @mr_ehmed Před rokem

    keep uploading on nest JS