Express Crash Course (2024 Revamp)

Sdílet
Vložit
  • čas přidán 2. 06. 2024
  • Get started with the most popular web framework for Node.js.
    Code from Video:
    github.com/bradtraversy/expre...
    Node.js Crash Course:
    • Node.js Crash Course (...
    14+ Hour Node.js API Masterclass Course:
    www.traversymedia.com/node-js...
    Timestamps:
    0:00 - Intro & Slides
    0:53 - What is Express?
    2:28 - Opinionated vs Unopinionated
    4:10 - Prerequisites
    5:18 - What we'll cover
    6:45 - Express Setup
    9:00 - Basic Server
    13:10 - --watch Flag & NPM Scripts
    15:25 - res.sendFile() Method
    18:00 - Static Web Server
    19:48 - Working with JSON
    22:35 - Postman Utility
    23:45 - Environment Variables (.env)
    26:30 - Request Params (req.params)
    29:35 - Query Strings (req.query)
    33:19 - Setting Status Codes
    36:40 - Multiple responses
    37:35 - Route Files
    41:40 - Using ES Modules
    43:47 - Request Body Data
    47:53 - POST Request
    50:23 - PUT Request
    53:23 - DELETE Request
    55:44 - Middleware
    1:00:24 - Custom Error Handler
    1:08:30 - Catch All Error Middleware
    1:10:47 - Colors Package
    1:14:17 - Using Controllers
    1:20:45 - __dirname Workaround
    1:24:29 - Making Requests From Frontend
    1:30:03 - Submit Form to API
    1:36:00 - EJS Template Engine Setup
    1:41:15 - Pass Data to Views
    1:42:50 - Pass and Loop Over Arrays
    1:44:20 - Template Partials
  • Věda a technologie

Komentáře • 118

  • @ultrasys
    @ultrasys Před 24 dny +5

    I don't work with Node and don't have any plans to. However, I still watched the whole video just because 1) your effort; 2) your skills; 3) I always learn something from you - in this case, one of the things was the Postman extension. Sure I learned a bunch of other little cool stuff. During the video, I couldn't escape thinking about what drives you into making these videos with such a level of care. Amazing. Thanks a lot.

  • @ivanivanovik418
    @ivanivanovik418 Před 23 dny +4

    This videos coming out right when I'm learning React and Node.js/Express feels like it's heaven-sent!

  • @8m4an
    @8m4an Před 26 dny +31

    dude is making mern stack course by dropping react , node now express js 👍

    • @prospermbuma
      @prospermbuma Před 26 dny +4

      You made me realise that 😊

    • @kelsey_roy
      @kelsey_roy Před 26 dny +3

      Do nestjs

    • @ssava_ema
      @ssava_ema Před 26 dny +9

      now I expect MongoDB crash course dropping next

  • @Brent-The-Carpenter
    @Brent-The-Carpenter Před 14 dny +2

    Thank you for taking the time to make these videos. Its crazy how much express cuts down on the boiler plate code. I went along with your Node.js video with the switch case etc to serve files which worked out to being around 55 lines of code, express accomplished the same functionalities in 7 lines.

  • @techwithjesus8263
    @techwithjesus8263 Před 20 dny +5

    Despite being a Senior DevOps Software Engineer, I always learn something new when Brad teaches. This crash course encapsulates the nuances of building an API, even if it’s a multi-billion dollar API. It all boils down to this basic concept. Thank you, Brad ❤

    • @the000gamer96
      @the000gamer96 Před 3 dny

      I wish I could get better at programming. No one ever has the right answer

  • @dee.s.4513
    @dee.s.4513 Před 25 dny +3

    Thanks for this great combo of a refresher and important pointers.

  • @Jerementor
    @Jerementor Před 3 hodinami

    love it Brad, thanks for this, very timely. Would love to see a deep dive on user auth and or working with sqlite db using express next!

  • @moestaxx286
    @moestaxx286 Před 26 dny +1

    thanks for this man! needed the as i’ve been learning aws for about 5 months. just started coding again and need to get the rust of my shoulders!

  • @shindeshubhamm
    @shindeshubhamm Před 15 dny +1

    Don't endorse express. But watching because the teacher is Brad.

  • @prospermbuma
    @prospermbuma Před 26 dny +2

    Thank you sir
    I have been waiting for this 🙌🔥

  • @aminumusa7190
    @aminumusa7190 Před 26 dny +1

    Thank Brad, I've long been waiting for this

  • @bmehder
    @bmehder Před 25 dny +1

    You're the OG of CZcams web tutorials. I'm a fan of your style of videos. Looking forward to what I assume will be a revamped Mongo crash course soon.

  • @Mohammed-bs8mc
    @Mohammed-bs8mc Před 24 dny +1

    Hi Brad, loving your tutorials this year, especially on React, Node.js, and Express.js! I've been following along and was wondering if you could consider doing a series on MongoDB next. It would be awesome to see how we can integrate it with these technologies for a full MERN stack project!

  • @vikasdfghjlYT
    @vikasdfghjlYT Před 22 dny

    this revamp was much needed !!! Thank You so much

  • @SsaliJonathan
    @SsaliJonathan Před 26 dny

    Thanks Brad. You are surely a blessing

  • @voboghure-dev
    @voboghure-dev Před 8 dny

    Thanks, I am about to learn Node/Express and this is much helpful at this moment.

  • @ramortega
    @ramortega Před 24 dny

    Thanks for this I am learning NodeJS and ExpressJS now and this video is i need

  • @Valdaur
    @Valdaur Před 26 dny +2

    I just want to express my thanks for your hard work! Looking forward to watching this.

  • @korodhsoaqoon
    @korodhsoaqoon Před 26 dny +1

    Thank you very much sir.... Your content is a GEM.

  • @maxnicely8926
    @maxnicely8926 Před 7 dny +1

    At 1:36:00, you are just adding empty divs, then showing all posts, which looks correct because it kind of does same thing.

  • @muhammadans7071
    @muhammadans7071 Před 24 dny

    thanks a lot bro, i was requesting you on your last node js crash course for express crash course. it is superb amazing tutorial as usual

  • @tahasoft1
    @tahasoft1 Před 26 dny +6

    The git repo link doesn't work

  • @atibyte
    @atibyte Před 19 dny

    After learning Django and a bit of Laravel, Express seems so lightweight. I really like it. Thanks Brad!

  • @tylerarrigoni7700
    @tylerarrigoni7700 Před 25 dny

    Nicely done! Thank you!

  • @lesternielfong1513
    @lesternielfong1513 Před 26 dny

    Sakto! Thanks for this :>

  • @CodeClem
    @CodeClem Před 25 dny

    Amazing course brad, would love if you would also make a crash course on Nest JS in the future.

  • @cloudagnostic
    @cloudagnostic Před 26 dny

    Damn, Brad, I love you ✊🏾

  • @CvetaMobi
    @CvetaMobi Před 24 dny

    Thank you for your labor!

  • @samlengngy5658
    @samlengngy5658 Před 26 dny +1

    Really good explanation. please have have a short course of nest js next time

  • @eleah2665
    @eleah2665 Před 26 dny +1

    Hi Brad and thanks.

  • @AmnaCode
    @AmnaCode Před 11 dny

    Thanks for sharing.😊

  • @saiveerendra3885
    @saiveerendra3885 Před 26 dny

    Thank u so much please do one rust course end to end

  • @OCEMTechZone
    @OCEMTechZone Před 26 dny +1

    Great Sir 🎉🎉

  • @ar4be
    @ar4be Před 26 dny

    Nice work, man! When we could expect your Laravel course?

  • @okkaraung9512
    @okkaraung9512 Před 26 dny

    brad. Thank you for the video. Please do complete mern course. React, Node and Express. I will be looking forward to MongoDB course. Nextjs course too. Again thank you for these videos.

  • @Brandcode-yq2wn
    @Brandcode-yq2wn Před 26 dny

    Thank you very much ❤

  • @eliuddyn
    @eliuddyn Před 26 dny

    Amazing 💥💥

  • @KycasCat
    @KycasCat Před 26 dny

    Hey Brad, pretty informative course, thank you. Wanted to ask about watching. --watch is not working on virtual environments such as vagrant (at least I could not make it working). I ended up using nodemon with polling. Maybe you have tested this feature with such environments?

  • @AkashPandya9
    @AkashPandya9 Před 22 dny +3

    Hey Brad, can't find the source code! (link in the desc seems broken). Also thanks a lot for the video❤

  • @codernerd7076
    @codernerd7076 Před 26 dny +2

    I worked with Express but got so tired of having to work for hours setup basic stuff like login/logout/forget password and so on, so I moved to the more active in development complete framework, Laravel, and it's working great!

  • @alireza5430
    @alireza5430 Před 26 dny

    thanks a lot ❤❤❤❤

  • @ayanupadhaya944
    @ayanupadhaya944 Před 26 dny

    loved it...

  • @m12652
    @m12652 Před 26 dny

    Thanks 👍

  • @cosanostraytc1030
    @cosanostraytc1030 Před 26 dny +1

    Thank you very much Brad... Excellent tutorial as always. The github link is not working

  • @ABMA79
    @ABMA79 Před 16 dny

    Dear Brad, I am one of your subscribers and always find new things to learn whenever I watch you.
    I was wondering if there is a chance to make a website using javascript as a front-end and expressJS as a backend and it will be lovely if you can make it with authentication and sessions.
    I hope to see that courses coming up because you are among the best that can deliver information...
    Best regards

  • @gg.cip0t
    @gg.cip0t Před 26 dny

    thanks for the video, its very good for the beginners.. i have a request, can you make a beginner friendly video on Clean Code ? about repositiory pattern ? I mean how can we implement to our Backend Typescript project ? I have watched other videoes but couldnt understand a bit.. since you are very good in teaching may be you can help ?

  • @lostinthenarrativve
    @lostinthenarrativve Před 26 dny +2

    Hey man, any plans on a mongodb crash course too ?

  • @tewogbadeoluwadamilare2772

    This should help me!

  • @21Moudud
    @21Moudud Před 7 dny

    Convenient to learn express

  • @ElCodingCowboy
    @ElCodingCowboy Před 10 dny

    I think you can also get the dirname and filename now with ES6 modules by doing import.meta.dirname and import.meta.filename

  • @argempusrecords
    @argempusrecords Před 15 dny

    what if I want my routes to be "/about" instead of "/about.html" then i would have to create a dedicated route for each page, right?

  • @shahbazjavedqureshi
    @shahbazjavedqureshi Před 24 dny

    Hey Brad, I can't find the code on your github. Thanks for the great tutorial and wish you the best!

  • @salahdidi8287
    @salahdidi8287 Před 19 dny

    Coming from the Laravel world, this feels like a huge downgrade, but this video is simply amazing for anyone looking to learn Express. Having knowledge in Laravel/Java made it easy for me to grasp the concepts. Thanks, mate

  • @joscript7846
    @joscript7846 Před 25 dny

    When everyone praising Hono? Brad is pushing express back on it feet

  • @RuslanMykolaiv
    @RuslanMykolaiv Před 22 dny

    is it better to use "node:path", instead of 'path'? And use it for all built-in methods just not to confuse with npm libs?
    Interesting your opinion.

  • @savageteam354k4
    @savageteam354k4 Před 23 dny

    hey men i really love the like your video it is deep and very helpful but right now i really struggle about file management like every time when i want to do some practice i always install react app again and again specially i am very confused by the installation of necessary files like nodemon , express ,node ,buble and run my file on terminal and like so on things really hard for me so can you make a tutorial video on how to handle files and folders, do we have to install every time when we want run our app or so many things please?!

  • @dev-akeel
    @dev-akeel Před 26 dny

    I am very old subscriber of this channel and I remember the guy who was too young. But it has now been a long time that I haven't seen him. Where is he?

  • @adheeshachamod9933
    @adheeshachamod9933 Před 26 dny

    Great!!!
    It would be better if you could update your angular course as well...

  • @chowiee5688
    @chowiee5688 Před 22 dny

    Express + firebase is Good combination in backend?

  • @ianfrye8988
    @ianfrye8988 Před 25 dny +1

    Can you do a revamp of NestJS??

  • @bilal5488
    @bilal5488 Před 26 dny

    Next mongodb then mern project 😍

  • @ericdelmermillen
    @ericdelmermillen Před 8 dny

    Really would prefer the errors not be left in as I prefer to pause and try to complete the examples myself.
    The switching between common js and module js syntax, for example, caused Brad to make an error exporting which wasn't obvious until he saved, but since I was trying to complete it myself with his errors still in the code from following along, it was confusing.
    Errors being left in to illustrate a point is one thing but I don't get the sense that Brad is sprinkling in errors like easter eggs but rather that he is winging it at times and then not editing out his errors.

  • @LongJourneys
    @LongJourneys Před 26 dny

    Oh hey I've been meaning to review express, it's been a while

    • @aaratbatra4676
      @aaratbatra4676 Před 26 dny +1

      What kind of bot ahh comment this is!

    • @LongJourneys
      @LongJourneys Před 26 dny

      ​@aaratbatra4676 I wish I was a bot...I wouldn't need a job or a place to live

    • @gradientO
      @gradientO Před 26 dny

      You're talking like express changed a lot in recent years 😂

    • @Erlandas_
      @Erlandas_ Před 26 dny

      @@gradientO wasnt it in maintainance mode, recomending users to use koajs, just a while back?

  • @miketerry4309
    @miketerry4309 Před 11 dny

    The specified URL to the repository does not work. Can you revise it please?

  • @mooreedit
    @mooreedit Před 26 dny

    do we still need express with frameworks like nextjs?

  • @kanchanpandey2950
    @kanchanpandey2950 Před 8 dny

    when will the mongodb crash course (2024 revampp ) will come ??

  • @rafikhankhadem6657
    @rafikhankhadem6657 Před 26 dny

    Please make one for NestJS :") Wanting to get into a backend framework which has almost everything setup :"D

    • @Erlandas_
      @Erlandas_ Před 26 dny

      Nestjs docs pretty much have everything you need, check them out. Its really not that scary

  • @konhaibhai-ze4ji
    @konhaibhai-ze4ji Před 9 dny

    which theme are u using?

  • @justindouglas3659
    @justindouglas3659 Před 26 dny

    Yoo do the angular one and vue

  • @mriservice1671
    @mriservice1671 Před 9 dny

    why does post come back undefined?

  • @athar_dev
    @athar_dev Před 21 dnem

    is there some discord community for traversy media?

  • @Muhammed-nani964
    @Muhammed-nani964 Před 23 dny

    do people use ts with express ??

  • @jameswalker9490
    @jameswalker9490 Před 26 dny +1

    I wouldn't include the @route comment in your controller. The controller doesn't care about what route it lives at.

  • @Code-sz9db
    @Code-sz9db Před 26 dny

    Bun with Hono for the next video???

  • @lonewolf9874
    @lonewolf9874 Před 26 dny

    I wish if you could make something about cookie and sessions authentication

  • @AchwaqKhalid
    @AchwaqKhalid Před 26 dny

    #Golang FTW 💪🏻

    • @kelsey_roy
      @kelsey_roy Před 26 dny

      Esoteric. Niche. Fewer jobs than node and python

  • @danielrafique
    @danielrafique Před 25 dny

    I prefer the Rapid API extension over postman. Hardly anyone uses it.

  • @alumaven
    @alumaven Před 26 dny

    I cant get the cool --watch flag to work :/

  • @regilearn2138
    @regilearn2138 Před 26 dny +1

    This time MERN courser with TYPESCRIPT please

  • @jabal_team
    @jabal_team Před 26 dny

    please make hayperExpress course 🙏

  • @amadywr
    @amadywr Před 15 dny +1

    is the github link working for you guys?

  • @TheEmmanuelN
    @TheEmmanuelN Před 26 dny

    PostgresSQL please - (PERN)

  • @m12652
    @m12652 Před 25 dny

    The github link doesn't work...

  • @scenearchive555
    @scenearchive555 Před 26 dny

    hey man please do a ruby on rails or php laravel course 2024 both of them have changed a lot

  • @codingwithsamanja8315

    do module.exports=router in case export default router isnt working.

  • @PaschalAOgba
    @PaschalAOgba Před 25 dny +1

    I wonder is it only me or is there anyone else that favorite EJS over React?

  • @cristitoderita3620
    @cristitoderita3620 Před 26 dny

    404 Typescript not found

  • @Js0109Js
    @Js0109Js Před 25 dny

    please provide the source code sir!

  • @yiannis_p
    @yiannis_p Před 8 dny

    Why the hell is he using JavaScript over typescript in 2024

  • @kopek3105
    @kopek3105 Před 26 dny

    >backend in js when we have python, java, go, c#
    💀💀💀💀

    • @Edgar-pu1lc
      @Edgar-pu1lc Před 26 dny

      Node js is better than python for the backend

  • @user-ov6kj1li3j
    @user-ov6kj1li3j Před 25 dny

    Express is crap, use laravel instead

  • @user-if2ww3jq3k
    @user-if2ww3jq3k Před 8 dny

    The specified URL to the repository does not work. Can you revise it please?

  • @jabal_team
    @jabal_team Před 26 dny

    please make hayperExpress course 🙏

  • @jabal_team
    @jabal_team Před 26 dny

    please make hayperExpress course 🙏