Express JS Crash Course

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ธ.ค. 2024

ความคิดเห็น • 798

  • @avnpl13
    @avnpl13 3 ปีที่แล้ว +246

    0:00 - Intro
    0:53 - What is Express and Why use it
    3:50 - Prerequisites
    4:44 - Basic Syntax
    5:58 - Basic Route Handling
    7:33 - Middleware Intro
    8:41 - Installations and Setup
    13:05 - Creating Routes
    14:43 - nodemon
    16:52 - Rendering html
    18:15 - Static
    21:38 - REST API
    23:53 - Middleware
    31:10 - Get Single Member
    37:24 - Express Router
    41:20 - Create Member
    50:10 - Update Member
    55:48 - Delete Member
    57:54 - Rendering Templates using express-handlebars
    1:07:00 - Forms

    • @timothy897
      @timothy897 3 ปีที่แล้ว +2

      Thanks Paul, I really needed this

    • @jaortiiss
      @jaortiiss 2 ปีที่แล้ว

      thanks a lot

    • @pellyhotter
      @pellyhotter 2 ปีที่แล้ว

      you the real mvp man!

    • @ForexPeak
      @ForexPeak ปีที่แล้ว

      You’re a legend making the already tough journey of self learning a whole lot easier❤️

  • @marcelgonzalez1376
    @marcelgonzalez1376 ปีที่แล้ว +5

    This is the second time I have watched and actively tried to learn all the content on this video. This crash course takes more than one sitting to learn.

  • @seth4402
    @seth4402 2 ปีที่แล้ว +167

    For those getting the error "TypeError: exphbs is not a function", for the line 12: app.engine("handlebars", exphbs({ defaultLayout: "main" }));
    You can update the path to: app.engine("handlebars", exphbs.engine({ defaultLayout: "main" }));

  • @LuisFlores-pg6vf
    @LuisFlores-pg6vf 5 ปีที่แล้ว +19

    Learning MEVN on the side while majoring in C.S to hopefully land a job as a full-stack developer after graduation, and you have been a huge help in my personal projects!!! Thank you

    • @fahadbshahid
      @fahadbshahid 8 หลายเดือนก่อน

      Did you get the job?

  • @andriiauziak1178
    @andriiauziak1178 5 ปีที่แล้ว +39

    Thank you very much Brad for this tutorial, actually all your tutorials are helping me a lot, and I hope the day when I will actually get a job and will be able to became patreon is near.
    But in this tutorial is a thing that can be done better: 57:42 delete request don't actually deleting member from array(we can check this by sending get request after delete one), filter method doesn't mutate initial array it's only returns new filtered array, and after this we should reassign our initial array to filtered one.
    I handled this by changing members "const" variable to "let" and simply reassigning it to new filtered array, but it is probably not the best solution.
    my solution:
    let members = require('../../Members');
    if (found) {
    members = members.filter(member => member.id !== parseInt(req.params.id));
    res.json(members);
    }
    Once again thank you for what you doing.

    • @MaoDev
      @MaoDev 4 ปีที่แล้ว

      the problem is that you're just overwriting the members variable but the actual data is not changed. What I mean is that the members object will not be changed to the filtered members, but only the members variable you declared.

    • @heeramunimurmu2999
      @heeramunimurmu2999 4 ปีที่แล้ว +8

      or a better way of doing it is by finding the index and delete it.
      if(found){
      const index = members.findIndex(member => member.id === parseInt(req.params.id));
      members.splice(index, 1);
      res.json({ msg: 'member deleted', members });
      }

    • @TheLittlemaster2009
      @TheLittlemaster2009 4 ปีที่แล้ว

      its not working for me and if it is working then why same thing working for update route where user setting it but not in delete route still confused about it

    • @TheLittlemaster2009
      @TheLittlemaster2009 4 ปีที่แล้ว

      @@heeramunimurmu2999 thanks man this is worked for me

    • @kimberlyvillarmente8239
      @kimberlyvillarmente8239 4 ปีที่แล้ว

      thank you. It works!
      'members.filter();' - Shallow Copy, meaning it's not really override the content inside JSON File Members.js. So, it's not recommended to use this directly to res.json().
      That's why he used:
      members = members.filter();
      Please try this by checking 'localhost:5000/api/members/' under API 'GET' [router.get]

  • @rajarshiroychowdhury4689
    @rajarshiroychowdhury4689 3 ปีที่แล้ว +4

    Completed many of your tutorials, just love the way you teach, not like the others who does something like "Look how much pro I am" styles, you rather get directly into what we needed, so that's great for me. Again , Thanks for the tutorials, appreciate you very much.

  • @gch910
    @gch910 4 ปีที่แล้ว +12

    something about the way you teach this stuff is just perfect, especially for someone like me who has only been learning programming for a few months. You are so thorough and you always explain every step that you execute on top of putting it into a real world context. Thank you for your content!

  • @dingFAching
    @dingFAching 5 ปีที่แล้ว +50

    This is the best crash course I've ever watched, and I've watched my fair share. Thanks for posting and keep up your fantastic work.

  • @sollymohlahatsa857
    @sollymohlahatsa857 3 ปีที่แล้ว +9

    I was blind, and now I see. My deepest thanks to you! You're an exceptional teacher

    • @lou7319
      @lou7319 11 หลายเดือนก่อน

      I was blind and am still blind, why am I so bad at app development

  • @RiseandThrive67
    @RiseandThrive67 ปีที่แล้ว

    33:32 instead of parseInt , Number wrapper can be used to convert to integer for example if we query for "2+8" in URL it will parse upto 2 and will return the 2nd id which is not expected.

  • @ahndeux
    @ahndeux 3 ปีที่แล้ว +2

    A one hour training with Brad is like a one week course in school. If it wasn't for the pause, rewind and replay button, I would have been very lost.

  • @meyimagalot9497
    @meyimagalot9497 5 ปีที่แล้ว +4

    I would totally pay for your courses. The highest quality stuff I have ever watched in my entire career (which is few weeks but still)

  • @noscreadur
    @noscreadur 5 ปีที่แล้ว

    This vid changed my life. If you are a complete noob with your first VPS, watch this twice. That's it. Everything falls into place on the second watch, you already feel like you are familiar with the concepts and they make sense the second go-round. All I needed was a walkthrough on Apache virtual server proxies, and I'm pushing code from server to browser for the first time, and it works. Lovely. Many thanks.

  • @riskitall7421
    @riskitall7421 3 ปีที่แล้ว +11

    Brad! Just wanted to point out something you did really well in this video that you sometimes don't do in your other videos; you explain why we're doing something briefly after everything we do enough for me to understand. For example, you said -D because we don't want to use this when we deploy it but just as a dependency for testing. Just small things like that but you did it a LOT and I loved it. Great tutorial man.

  • @vu5700
    @vu5700 3 ปีที่แล้ว +4

    Its insane how much info you provide in such short tutorials!

  • @ЧингисКасен
    @ЧингисКасен 3 ปีที่แล้ว +73

    This dude is everywhere

    • @niteshsaini408
      @niteshsaini408 3 ปีที่แล้ว

      Literally 😂

    • @Flo487x2
      @Flo487x2 3 ปีที่แล้ว +3

      Yeah true xD
      I watched his React Tutorial, but I also wanted to learn something for JS Backend, and here we are xD

  • @paulhiggins6587
    @paulhiggins6587 5 ปีที่แล้ว +2

    Hi Brad just want to say I'm a big fan of yours watched most of your TH-cam courses even bought a Udemy course, I have to say recently you have really upped your game, this video and the one on RUST are just brilliant they are so easy to understand. I have always have had a life long passion for programming, my main passion is PHP and have and a love hate relationship with javascript but at the age of 60 it is harder to keep up with new features that come along but with your new way of teaching I'm keeping up with the teenagers. Keep up the good work!!

  • @VarunJoshi95
    @VarunJoshi95 3 ปีที่แล้ว +10

    Hey! You and Kyle go way back it seems! While I wait for your freelancing course, I'm absolutely thankful to you Brad for your high quality tutorials!

  • @michaelgreene6441
    @michaelgreene6441 3 ปีที่แล้ว

    You absolutely do the best videos. There is not a lot of handholding, just clear information. You say things that I haven't been fully aware of yet, so I know I need to stop and research that specific point. There are way too many tutorials that are like "this code goes here do this look its a beautiful app" ... change one line... 500.

  • @germanhabreu
    @germanhabreu 5 ปีที่แล้ว +3

    Amazing. You truly are the best on YT. Thanks Brad for this excellent CC on express. Super easy to follow thru and understand the concepts. Now gonna try to put it to use! Thanks a Million.

  • @techronin_
    @techronin_ 4 ปีที่แล้ว +6

    Thanks so much for this Brad. You make learning web development approachable and easy to understand. It really helps people, who might be intimidated about trying, the confidence to and understanding to get started on all the ideas that they have, but didn’t think they had the ability to get it done.

  • @GGanzolo
    @GGanzolo 3 ปีที่แล้ว

    Seriously, the best express course i've seen on youtube by far. You explained in the first 30 minutes everything i've learned in one month of classes. Thank you so much.

  • @AslamD
    @AslamD 5 ปีที่แล้ว +18

    Dude you are bombarding courses after courses :)
    Big Fan.

  • @megatrondragon4945
    @megatrondragon4945 2 ปีที่แล้ว

    By far the most helpful express video, thank you for making these videos so beginner friendly. Instead of being one of those youtubers who make everything so complicated to prove how smart they are.

  • @contrazzed3651
    @contrazzed3651 8 หลายเดือนก่อน +1

    Great video, excited for you to revisit this crash course following your NodeJS crash course. My only critique is the small tangent using moment over the vanilla Date toISOString() for the logger.

  • @marmikupadhyay303
    @marmikupadhyay303 4 ปีที่แล้ว +18

    For me, Brad's natural voice is the 1.5X voice. every time I listen in 1x I find It like its slow mo

    • @MrMaksuz
      @MrMaksuz 4 ปีที่แล้ว +4

      1.25 is perfect

    • @dazelmann6589
      @dazelmann6589 4 ปีที่แล้ว +1

      Hahahaha ...if you know the tech he's teaching then sure it is. Otherwise 1.25x

  • @mokanamedia
    @mokanamedia 5 ปีที่แล้ว

    Your approach resonates, from the sound of your voice to the layout of the topic. Others should take a lesson from you on how to do a lesson. There are a few simple elements, from keyboard sounds and clicks, to articulation, to being thorough with the scaffolding that supports the concepts. One of the quickest ways to get me to bail on a video within seconds is keyboard clicks and thumps on the desk, to coughs and snorts, to over zealous fake intensity, to "Yo man, what up" cliches, to basically any sound effect that detracts from the message. You do good work.

  • @toannew
    @toannew 3 ปีที่แล้ว

    Explainations on:
    11:45 const PORT = process.env.PORT || 5000;
    14:50 npm i -D nodemon
    33:30 res.json(members.filter(member => member.id === req.params.id))
    42:40 how to post
    44:25
    app.use(express.json());

  • @mykolamysko987
    @mykolamysko987 5 ปีที่แล้ว +1

    As always, great tutorial!
    Just one little thing I've noticed - when we DELETE, we don't actually delete the item from local memory(from members). Instead we just return an array of members without the deleted one. Then, when making GET request, we're are still getting all the members items which include the previously deleted one.

    •  5 ปีที่แล้ว +2

      Hey Mykola, I've found out that happening here too, solved with assigning the members value before the json, and using 'let' instead of 'const' for members when requiring it :
      let members = require('../../Members')
      ....
      if (found) {
      members = members.filter(x => (x.id != req.params.id))
      res.json({
      msg: 'Member deleted.',
      members
      })

  • @alekskenins
    @alekskenins 7 หลายเดือนก่อน

    Whenever I need to learn something new I look to see if Traversy has a video on in first, so thank you! One thing I learned that I want to share is you don't need to use nodemon anymore. Server restarting is baked into node by default now. Just run the following when starting your server:
    node --watch index (or whatever your file is called)

  • @shreyasbalachandran2576
    @shreyasbalachandran2576 5 ปีที่แล้ว +9

    Thank you Brad! Now my learning schedule for Nodejs is complete! You are awesome! :D

  • @EntyFu
    @EntyFu 5 ปีที่แล้ว +1

    My boot camp loves your channel! I'm sending them your way for most of the crash courses

  • @harryb4608
    @harryb4608 3 ปีที่แล้ว +1

    It's always refreshing to watch your videos before interviews. Great course!

  • @revillsimon
    @revillsimon 4 ปีที่แล้ว +1

    Great stuff Brad, as usual. Nice how you covered the Templates as well as the API stuff in the same video - very helpful in getting the whole picture. Best of all - Express seems really easy to get started with. Glad to see you’ve passed 1M subs now!

  • @saqixpro239
    @saqixpro239 5 ปีที่แล้ว

    Honestly I learn coding mostly from TH-cam and surely this channel is hugely amazing and most recommend to all programmers from the biggest names to the smallest names

  • @lings628
    @lings628 4 ปีที่แล้ว +1

    Your crash courses are amazing, exactly on point. The right speed and the right amount of content. Super easy for developers to learn things quickly and get started with it.

  • @shubhamgarg5007
    @shubhamgarg5007 11 หลายเดือนก่อน

    57:30 The json array is not being modified. We are just filtering the list to not have the given member id and returning it, but it is essential to modify the list as well. After modification, we can return the list without any filters.

  • @calebmbugua745
    @calebmbugua745 5 ปีที่แล้ว +25

    From Kenya..Thank you brad for being a great mentor to Many of us.

  • @mohameda.ibrahem3834
    @mohameda.ibrahem3834 5 ปีที่แล้ว +45

    thanks for your work brad, I appreciate your effort a lot if you can make a video explaining how to handle "Access control list (ACL)" using Express.js and MongoDB I will be thankful, thank you again for what you do.

    • @PhilanJames
      @PhilanJames 5 ปีที่แล้ว +2

      check this link: blog.codecentric.de/en/2018/07/protecting-resources-with-node_acl-module-in-nodejs/

  • @FriedrichBoettger
    @FriedrichBoettger ปีที่แล้ว

    Great followup to the Node.js Crash Course. I forgot all this stuff years ago, as javascript is not my strong suit. A few hours with both courses brought it all back (for good or ill). Much appreciated.

  • @HungNguyen-lp8ql
    @HungNguyen-lp8ql 5 ปีที่แล้ว

    You are the person with the best coding crash courses on youtube. Your videos helped me on multiple occations. Thank you for your work. Really appreciate!

  • @TheAxeliono
    @TheAxeliono 4 ปีที่แล้ว

    I’m taking a coding boot camp and just had assignments on express. It was confusing as hell and this channel has helped me before so hopefully I understand after watching

  • @pblinfo8531
    @pblinfo8531 4 ปีที่แล้ว

    15:45, If for some reason your server doesn't start when you put in "npm run dev", then you should check your npm config settings by entering "npm config list" and checking if "ignore-scripts = true". If ignore-scripts = true then you need to edit the .npmrc file located in /User/[current user] so that ignore-scripts = false .
    Once you edit the .npmrc file, you should be able to run npm scripts.
    Hope this helps!

  • @FullSparks
    @FullSparks 3 ปีที่แล้ว

    Have just finished this course and it is fantastic! I completed the NodeJS Crash Course this morning and have just finished the ExpressJS Course. Next for me is ReactJS then I will look at building my first MERN Full Stack application. Thank you again!

    • @mofe620
      @mofe620 2 ปีที่แล้ว

      How's it going?

  • @nimazarei2760
    @nimazarei2760 2 ปีที่แล้ว +14

    If you're getting a *TypeError saying that exphbs is not a function,* change the code in this way:
    1. Change the *import statement* from _const exphbs = require("express-handlebars")_ to *const { engine } = require("express-handlebars")*
    2. Change the *engine callback* from _app.engine("handlebars", exphbs ({ defaultLayout: "main" }))_ to *app.engine("handlebars", engine({ defaultLayout: "main" }))*
    This will get rid of the Error.

  • @heatedrican
    @heatedrican 5 ปีที่แล้ว +2

    Hey Brad thanks a million for this course! You are a hero man!! This is the second of your crash courses that I completed and it was just as awesome as the last one. God bless you!

  • @javascriptmastery
    @javascriptmastery 5 ปีที่แล้ว

    You simply cover everything important in every single video. Cheers Brad!

  • @farhanprine
    @farhanprine 5 ปีที่แล้ว

    You have a real sense for teaching, clear concise, easy to understand information delivered in a manageable way (for new comers), really appreciate you work, thank you!

  • @nikhilgoyal007
    @nikhilgoyal007 5 ปีที่แล้ว

    Hi Brad, thanks for this! I know everyone likes your content and we can't help but ask for more. I just wanted to say please take care of yourself and don't get burnt out helping us! cheers!

  • @user-rp9iis1en6h
    @user-rp9iis1en6h 4 ปีที่แล้ว

    Wow, after many instructor's lessons finally I have found something that easily made me understand the basic nodejs. Nothing could be easier than this tutorial.

  • @algife
    @algife 3 ปีที่แล้ว

    Your content is gold and I'm recommending it to my peers starting their dev journey. Some code snippets can be improved substantially however but is enough for starting to put their hands on this technologies and understand them. Congrats and thanks a million!

  • @Cpt_Chirp
    @Cpt_Chirp 4 ปีที่แล้ว

    You make the absolute best cs tutorials I've ever used.

  • @naveenperpaga1821
    @naveenperpaga1821 4 ปีที่แล้ว

    Just Completed the Full Crash Course..This was a very helpful tutorial for me who has just started learning javascript and express..the whole course was thoroughly explained... THANK YOU BRAD SO MUCH ..:)

  • @jeffmlb256
    @jeffmlb256 3 ปีที่แล้ว

    I am lacking words to describe how thankful I am.
    You have made most of the concepts I learned in school so much easier and I can confidently say, I feel comfortable when I am asked to perform a tasks on front end or back end. Although I am still learning. If you ever had a paid course, I will purchase it 1000% God bless

  • @angry_moose94
    @angry_moose94 4 ปีที่แล้ว

    Awesome. Most comprehensible express course I've came across. Others either don't explain the code properly or don't even bother doing it lol.
    Btw at 57:30 when you filtered out the array, excluding the id to be deleted, it doesn't actually delete the instance from the array. The filter function just doesn't return it. I know that wasn't the point of this course because you would use a database in normal situations and thus you wouldn't normally remove data from an array and would just use the DELETE sql command (depending on the database used) but still, I just noticed it.
    Anyways, thanks for this!

  • @dariuspalmer2829
    @dariuspalmer2829 3 ปีที่แล้ว

    Only person that actually explains things indepth.

  • @MatsumotoKael13
    @MatsumotoKael13 3 ปีที่แล้ว

    Yet another addition to the long list of exceptional content your channel has to offer. Thank you!

  • @williamfish1734
    @williamfish1734 2 ปีที่แล้ว

    You're changing lives man. You and the two guys with Clever Programmer are helping me apply everything im learning so that I can really learn it. Keep it up! Also DROP THE HOODIE IN YOUR MERN STACK lol

  • @joseabendeck8266
    @joseabendeck8266 5 ปีที่แล้ว +1

    The Timing!, yesterday I finished your Node.js course and my plan for today was to start your 2016 express video. Awesome :D

  • @mrsfetterman
    @mrsfetterman 3 ปีที่แล้ว

    Thank you sir! I'm saving thousands of dollars by following you instead of paying for a bootcamp. Love how you break it down. Next up, your MERN Udemy course :)

  • @dbrousey
    @dbrousey 4 ปีที่แล้ว

    Excellent Tutorial! I've been looking to switch my webdev students over from LAMP environments and PHP to Node JS and Express, and your crash courses have saved me a tonne of time! Can't wait to watch the MongoDB :)

  • @godhandinfamous
    @godhandinfamous 5 ปีที่แล้ว +1

    Can't get enough of express tutorials. Thanks Brad

  • @gilbmp
    @gilbmp 2 ปีที่แล้ว

    This was the best tutorial I've seen about ExpressJs. Thank you a lot, man.

  • @amymarais4909
    @amymarais4909 3 ปีที่แล้ว

    This was brilliant! I was confused for weeks and within an hour I understand everything! Thank you :)

  • @MrdLord100
    @MrdLord100 4 ปีที่แล้ว +1

    you are The best teacher
    can't imagine how much we will learn if you make tutorial series of node js ❤️❤️❤️❤️

  • @Fivousix
    @Fivousix 4 ปีที่แล้ว

    Another FANTASTIC video. Clarified so many points for me, thx Brad!
    Keep up the good work.

  • @katherinebl
    @katherinebl 5 ปีที่แล้ว +1

    My 4th crash course this week! love your classes, thanks!

  • @KyawMyo
    @KyawMyo 3 ปีที่แล้ว

    Thanks, the best course I ever had in TH-cam for Node/Express JS.

  • @rosselliot8971
    @rosselliot8971 5 ปีที่แล้ว

    In the POST request it makes more sense to check the existence of fields in the request before you create newMember, which is when you'd also do sanitising and validation.

  • @adityajaiswal9993
    @adityajaiswal9993 4 ปีที่แล้ว +2

    Hey Brad after going through your crash courses any body can include ' Basics Of XXX Topic ' very easily on the resume. Great work by creating these crash courses well appreciated!!

  • @JamesBailey1
    @JamesBailey1 5 ปีที่แล้ว

    Always the best content, delivery, expertise, practices, and personality, I would love to know this guy personally. I have learned a lot from Brad Traversy

  • @tannerbarcelos6880
    @tannerbarcelos6880 4 ปีที่แล้ว

    This and reading the corresponding docs as I follow.. sheesh this is great! Backend is more fun than i thought!

  • @TechnoSparkBigData
    @TechnoSparkBigData 5 ปีที่แล้ว +159

    Hi Brad could you please create a crash cource on microservices using node js and please also include the docker as well.

  • @mwql23
    @mwql23 3 ปีที่แล้ว

    Thank you for sharing. The course was fast-paced, but alot was done in a short time. Much appreciated!

  • @stephanpedersen5079
    @stephanpedersen5079 4 ปีที่แล้ว +2

    you could make a video of 5 or 10 hours and it would still be worth watching. NEVER STOP WHAT YOU DO

  • @Dogdogdogdog1234
    @Dogdogdogdog1234 5 ปีที่แล้ว +11

    Thank you Brad for such a high quality tutorial!

  • @michongoma7598
    @michongoma7598 5 ปีที่แล้ว +2

    Thank you so much! I have been waiting for an updated version of his tutorial

  • @somebodyoncetoldme1704
    @somebodyoncetoldme1704 2 ปีที่แล้ว +1

    Unlike many other crash courses I did on this channel (JS, TS, node.js, HTTP), this one was not as good imo.
    Many times I was left confused on why something worked the way it did, or what the actual use case for it is, leaving me to mostly fend for myself against the documentation.
    Don't get me wrong, I love taking these short crash courses and have google on hand for the small details that are lost in the video, but this course had me mostly googling.
    A one hour crash course took me several days to complete.
    I still appreciate the free tutorial though, keep them coming.

  • @socialsource
    @socialsource 3 ปีที่แล้ว

    Always a pleasure to learn (something new) from you, Brad. You' re such a knowledgable guy. Thanks.

  • @codewithnacho
    @codewithnacho 5 ปีที่แล้ว +5

    Great video Brad! Express is awesome and flexible. I would love to see a course where you use the debugger for express applications. Thanks for all your work

  • @fancyAlex1993
    @fancyAlex1993 3 ปีที่แล้ว +1

    A sunday well spend by learning express. God Bless you Brad .

  • @matthewjonathonmajor5370
    @matthewjonathonmajor5370 4 ปีที่แล้ว +8

    You are an amazing educator! So organized and just the right amount of detail! Love your tutorials, please keep them coming!!

  • @extremespartan117
    @extremespartan117 5 ปีที่แล้ว

    I really appreciate the effort you put into these tutorials. You get straight to the point!

  • @yusufkayode2726
    @yusufkayode2726 5 ปีที่แล้ว +3

    Not all heroes wear cape
    Traversy is one of them
    Thanks alot

  • @DuncanInUK
    @DuncanInUK 5 ปีที่แล้ว +1

    Brad's videos are concise and informative, web dev is a common skill but few can explain those can clearly as Brad does!! Thank you Brad for the possibility of bringing my project to life!

  • @Izngd
    @Izngd 5 ปีที่แล้ว

    Great work, I swapped out your .filter() method for .find() when returning "a" user. I think it makes more sense returning a single object not wrapped in an array when asking for "one" object.

  • @stefansokolowski
    @stefansokolowski 4 ปีที่แล้ว

    This is such a great tutorial vid. Concise explanations and structure as opposed to people trying to be funny and wasting the viewer's time.

  • @He4rtRock
    @He4rtRock 5 ปีที่แล้ว

    (14:30) The "Content-Type" is part of the response-headers, which are never shown in the page-source.

  • @mohammadbayat1635
    @mohammadbayat1635 ปีที่แล้ว

    I was getting an empty json object on the browser while trying to save "Members" as "js" extension as he did. I modified that to Members.json now I get the same result as he is getting. I believe it when you send out res.json(members), json() is expecting the content-type to be a json ,but you are passing "js". Anyway, thanks for the quick express js course !

  • @GGSoft2009
    @GGSoft2009 2 ปีที่แล้ว

    All of your videos are very useful. You are explaining very coolly. Thanks a lot for your work. That's why I love your channel.

  • @monkey_see_monkey_do
    @monkey_see_monkey_do 5 ปีที่แล้ว +6

    The most amazing express course in my life, thanks a lot! It helped me to understand the very gist of stuff, REALLY GOOD JOB!

  • @mrinalkaustuv
    @mrinalkaustuv 5 ปีที่แล้ว +1

    Wow what an amazing explanation of the subject. Never seen such a way to deliver concepts.... :)

  • @ssbrar
    @ssbrar 4 ปีที่แล้ว

    Happy birthday Brad, lots of love and wishes for you and your family.

  • @yaboibigrig
    @yaboibigrig 3 ปีที่แล้ว

    33:51 - What are the benefits to keeping the triple equals and using parse int, rather than just making it a double equals?

  • @kreuza674
    @kreuza674 3 ปีที่แล้ว +1

    The best course , made me exited to start learning and practicing. Thank you

  • @smartguides8910
    @smartguides8910 4 ปีที่แล้ว

    I really loved the crash course. it's more than crash course. I found it really easy to learn this, I came from java and concept is really really similar.

  • @vidalroland
    @vidalroland 5 ปีที่แล้ว +5

    I finally understand how middlewares work !

  • @ozgur95
    @ozgur95 3 ปีที่แล้ว +2

    22:00 The reason why you didn't use async controller function is that you just not dealing with database, right? That part a bit confused me.

  • @Davieu101
    @Davieu101 5 ปีที่แล้ว +4

    Just a quick heads up awesome video. I am right at the 58:00 minute mark. I don't believe your delete endpoint actually deletes. I think it just displays the members you don't want to show. Because as soon as you delete another it just displays the ones not in the req.params.id.
    To delete I switched your code out and used:
    if (found) {
    //this index variable finds the index of the member ID chosen with the help of findIndex. it just returns an index number of the location.
    let index = members.findIndex(member => member.id == req.params.id)
    console.log(index)
    // this splice deletes/removes exactly where the index of the member you want to delete
    members.splice(index, 1)
    res.json({ msg: 'Member deleted', members })
    } else ........
    This will delete the member chosen. Also I removed the parseInt() on the req.params.id because the uuid will not be an integer once you add members. Since the uuid is jumbled up with numbers and letters.
    Hope this helps someone!

    • @jimh7604
      @jimh7604 5 ปีที่แล้ว

      good point !

    • @JohnTitorrrrrr
      @JohnTitorrrrrr 4 ปีที่แล้ว

      Was looking for someone who pointed this out!! Kudos

  • @sudarshan_savvy
    @sudarshan_savvy 4 ปีที่แล้ว

    Just here to say thank you brad, already taking your MERN stack and reached halfway. Thank you.