RESTful APIs in 100 Seconds // Build an API from Scratch with Node.js Express

Поділитися
Вставка
  • Опубліковано 18 лют 2021
  • What is an API? What is REST? Learn how an Application Programming Interface (API) can adhere to Representational State Transfer (REST) to enable reliable communication between apps fireship.io/tags/node/
    👕 Best comment wins a free T-shirt (read fine print at end of video)
    Open API Spec swagger.io/specification/
    Request Methods developer.mozilla.org/en-US/d...
    #api #js #100SecondsOfCode
    Install the quiz app 🤓
    iOS itunes.apple.com/us/app/fires...
    Android play.google.com/store/apps/de...
    Upgrade to Fireship PRO at fireship.io/pro
    Use code lORhwXd2 for 25% off your first payment.
    My VS Code Theme
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
  • Наука та технологія

КОМЕНТАРІ • 901

  • @MrNsaysHi
    @MrNsaysHi 3 роки тому +2593

    Front-end Dev: fix your responses!
    Backend Dev: fix your requests!

    • @nicosup
      @nicosup 3 роки тому +210

      meanwhile fullstack devs, jaja mere mortals

    • @skyracer-mk8hg
      @skyracer-mk8hg 3 роки тому +116

      until you notice that a rest api requires json as input and outputs xml

    • @priyanshusharma6763
      @priyanshusharma6763 3 роки тому +25

      And that's how hatred cycle continued 🤣

    • @rifaldhiaw
      @rifaldhiaw 3 роки тому +104

      User: Fix your app!

    • @ragulu9267
      @ragulu9267 3 роки тому +63

      @@rifaldhiaw Tester : "We found a bug"

  • @0mdshuvo0
    @0mdshuvo0 3 роки тому +517

    Manager: Why isn't your APIs responding?
    Me: Its RESTing

  • @doroaros
    @doroaros 2 роки тому +714

    It's incredible how much you can explain and transmit in 100 seconds while others cannot reach an idea in 40 hours courses.

    • @ProtikPC_pro_indigo
      @ProtikPC_pro_indigo 2 роки тому

      hey there.
      the what, why how
      of
      express node jWT and other allied technologies within the ecosystem.
      In a NutShell.
      ua-cam.com/video/CNVtR0WgKDc/v-deo.html
      LIKE, SHARE and SUBSCRIBE to the channel for more.

    • @Konslufius
      @Konslufius 2 роки тому +16

      Because they tend to drift away and mention a bunch of terms that are relevant but don't elaborate further and you just have to understand/know them.

    • @monssidus1291
      @monssidus1291 Рік тому +2

      not even one redundant word in any sentence. much appreciated for well thought out and articulated education.

    • @monssidus1291
      @monssidus1291 Рік тому +5

      @@Konslufius people aren't RESTfull, the way data goes between humans is not fun.

    • @afifnusada4712
      @afifnusada4712 8 місяців тому

      that’s what i was going to say😮😮.

  • @97rob97
    @97rob97 3 роки тому +624

    Interviewer: What is a REST API?
    Candidate: API that follows the rules of RESTful
    Interviewer: You hired!

    • @blackhole783
      @blackhole783 3 роки тому +2

      Enough?

    • @balajiravi9259
      @balajiravi9259 3 роки тому +1

      Lol😂😂

    • @nig3ldoug1as63
      @nig3ldoug1as63 3 роки тому +2

      Enough?

    • @user-mc8wg6qq3b
      @user-mc8wg6qq3b 2 роки тому

      Lol😂😂

    • @ProtikPC_pro_indigo
      @ProtikPC_pro_indigo 2 роки тому

      the what, why how
      of
      express node jWT and other allied technologies within the ecosystem.
      In a NutShell.
      ua-cam.com/video/CNVtR0WgKDc/v-deo.html
      LIKE, SHARE and SUBSCRIBE to the channel for more.

  • @philipbecker3332
    @philipbecker3332 3 роки тому +87

    I love this. Straight to the point and extremely clear - I was searching for days for something like this! Thank you!

  • @skuffies
    @skuffies Рік тому +16

    I always love your 100 seconds videos and your tutorials but this one really makes it up there amongst the best, really great explaining and it helped me complete my first project.

  • @Nintron
    @Nintron 3 роки тому +78

    “All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can’t get them together again, there must be a reason. By all means, do not use a hammer.”
    - IBM Manual, 1925

    • @nothingnoone8752
      @nothingnoone8752 3 роки тому +1

      TIL IBM was founded in _1911_ ?!? Wtf?

    • @hik12
      @hik12 3 роки тому +4

      @@nothingnoone8752 Yeah, for one reason they are critiqued for helping the Nazis, might wanna check that out.

    • @PabloBianchiOK
      @PabloBianchiOK 3 роки тому +1

      It's cooler 1925, but should say 1975: ibm.com/downloads/cas/1V29LE4Z

  • @Alex-xl4xe
    @Alex-xl4xe 2 роки тому +106

    Holy crap, every single new video of you astonishes how it is possible for a single human being to keep up to date with all these technologies and even explaining them so well, putting them into 100 seconds of proper video and even offering longer tutorials as a pro-Member. Insane!

  • @bnardus
    @bnardus 3 роки тому +9

    I literally spent the last 2 days trying to decide what approach I should take for an API, and here you are. It's as if the needs of devs just calls to you

  • @donmikkodanm.olmillo8154
    @donmikkodanm.olmillo8154 3 роки тому +10

    I have started on learning JS, Node and Express. Thank you for this awesome video about RESTful APIs. This really helps me getting things much clearer!

  • @highfructosecornsyrup
    @highfructosecornsyrup 3 роки тому

    i find your videos a nice way to refresh myself (without watching an hour-long video) when i haven't touched a certain topic in a while, thanks Fireship!

  • @nate1988
    @nate1988 2 роки тому +2

    I've been working on an API/Express project and I had no idea tools like Insomnia exist. Game changer -- thank you *so* much for another great video.

  • @mattroark216
    @mattroark216 3 роки тому +5

    This was an amazing video just lime the rest of them. I love your channel and all you do. Becuase of your videos I was able to keep working where other wouldn't!! Thank you !

  • @tobiasrasmussen4347
    @tobiasrasmussen4347 2 роки тому +7

    Fantastic tutorial. Your instructions are very easy to follow, the pacing is perfect for getting to the points fast without feeling rushed, and this provides the perfect foundation for further exploration.

  • @keitumetsemolefe3515
    @keitumetsemolefe3515 9 місяців тому +1

    This is by far the most clear and straightforward tutorial I've ever come across. Thank you so much 🔥🔥

  • @Joshua-yc9ei
    @Joshua-yc9ei 3 роки тому +1

    When I first learned about REST apis it took me weeks if not months to understand this concept, your videos are amazing, keep it up!

  • @Tabu11211
    @Tabu11211 2 роки тому +4

    Nice! took me a few days to get through this 100 second video but I actually earned my congratulations this time! Thank you for the content! I look forward to more like this!
    some more exclamation marks for good measure: !!!!!!!

  • @_timestamp
    @_timestamp 3 роки тому +122

    10:59 YES, I (we?) want a full tutorial :)

  • @GaborGubicza
    @GaborGubicza 8 місяців тому +1

    This was a really cool video. I heard about REST API, I read swagger doc, used Postman, heard about curl, JSON, but this video nicely tied everything together
    It's both terrifying and exciting at the same time to transition from HW to SW ENG. This is week 2. Thanks, keep up the good work.

  • @haciendadad
    @haciendadad Рік тому

    This was perfect, timewise and feature wise for me to test something out. I didn't want to spend hours working through a tutorial! I am new to this channel, but I subscribed and liked this video. I'll have to check out your other videos too. I have a feeling I am going like them too!

  • @ericzorn3735
    @ericzorn3735 3 роки тому +14

    Great content as always, I would love to see the AWS infrastructure provisioning via swagger/open API documentation. Never knew that was possible, but that’s really cool

  • @patrykmakowski5362
    @patrykmakowski5362 3 роки тому +3

    Love your content. Saw every video and there is no person like you on the whole youtube. Every material Is well structured and explained better in few minutes than some tutorials 1h long.

  • @calderov
    @calderov 4 місяці тому +1

    This channel is gold! I learned more in 10 minutes from you than in a couple of hours reading sparse documentation. Thak you!

  • @petrustefanescu5842
    @petrustefanescu5842 2 роки тому +2

    We learned WebSockets/Message Queues and RESTful APIs in Java. It had a LOT of boilerplate code, it was frustrating. Good thing I discovered afterwards Express, but I've also learned something from your video. Keep up the good work!

  • @zachariahtatman7381
    @zachariahtatman7381 2 роки тому +3

    Idk why but this video is so good at explaining the essentials while also going into detail when needed. This is like the only video i watch to help refresh my memory of APIs. Its like my 5th time watching lmao

  • @abishekp.y4736
    @abishekp.y4736 3 роки тому +128

    All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer.

    • @Fireship
      @Fireship  3 роки тому +47

      Well done! That was quick, send me an email or DM on slack with your size and mailing address 👕

    • @abishekp.y4736
      @abishekp.y4736 3 роки тому +2

      @@Fireship thank you 🤩

    • @neillunavat
      @neillunavat 3 роки тому +1

      Uhhh

    • @SirDamatoIII
      @SirDamatoIII 3 роки тому +8

      If the only tool in your toolbox is a hammer, every problem somehow seems like a nail.

    • @neillunavat
      @neillunavat 3 роки тому +11

      @@SirDamatoIII my mans breaking the fourth wall of philosophy here

  • @noonereally0007
    @noonereally0007 Рік тому

    I LOVE YOUR 100SEC videos. they're the best to get a general idea over new terms or languages... as i was about to search for rest api, i found this video, and its the best for me to know what to go on and do now

  • @adnanamin3666
    @adnanamin3666 3 роки тому +1

    OK! I'm not binging Netflix onward!! Here I'm watching FIREShip productions.
    This 100s series got me rolling deeper into web development more than I have ever did. Hats off for such genius content creation. Loving it! 💯
    I've never enjoyed and learnt so much my entire YT browsing history before running into Fireship. 🤞

  • @Exen88
    @Exen88 Рік тому +4

    I swear my college class on programming was a waste. I couldn’t learn and the teacher doing the teaching made it difficult to like.
    Now on my own term, videos like this I can digest the information really well.
    Who is doing the teaching matters. Thank you youtube and the proliferation of information from the internet.

  • @vasco___
    @vasco___ 3 роки тому +464

    all of those jokes are tiring me, i need to REST :D

  • @joeljohnson6445
    @joeljohnson6445 3 роки тому

    Bro, this channel is so underrated. Like I know so much more of js from you. Love the animations too. Keep up the great work!

  • @markpeterson1779
    @markpeterson1779 3 роки тому +1

    This video was perfectly timed! I just started working on Express in my bootcamp. Thanks for the helpful video!

  • @inklingboi8431
    @inklingboi8431 3 роки тому +102

    418 is the "I'm a teapot" response code, nice xD

    • @w1d3r75
      @w1d3r75 3 роки тому +17

      Twitter also have a 420("enhance your calm) status code for rate limit request xD

    • @inklingboi8431
      @inklingboi8431 3 роки тому +1

      @@w1d3r75 haha nice X)

  • @key_michael
    @key_michael 3 роки тому +29

    In continuity to this tutorial I would suggest that a set of videos showing how to deal with persistent data would be ideal. Most people can learn how to create the API URIs, but the real deal is when it is for a developer to manage to records to a Database. That's MySQL for example and not Firebase which happens to be more simplified. Also, an example from various programming languages should help a ton of people to move things forward.

  • @anuragmahajan5919
    @anuragmahajan5919 3 роки тому +1

    Love your video dude! It was taught to us for hours and I didn't understand anything but here in just - 100 seconds

  • @sharpdotexe1660
    @sharpdotexe1660 3 роки тому +2

    The quality of your videos is just excellent. Keep up the great work 🙏

  • @verybadmusic
    @verybadmusic 3 роки тому +36

    Whenever there is a new Fireship video, I feel like Neo when he's about to learn Jiu-Jitsu

  • @0ne4rif
    @0ne4rif 2 роки тому +6

    I'm a front-end dev (Angular), I find your video simple and straightforward. Thank you!

  • @idestis
    @idestis 3 роки тому

    The level of how you providing content is awesome. This is really inspiring.

  • @user-rf4oj6rm5n
    @user-rf4oj6rm5n 2 роки тому

    Thank you so much, there are so many guys want to explain a concept in “simple” term but actually mess easy things up

  • @Springfielde
    @Springfielde 3 роки тому +15

    The knowledge you pass on isn't comparable in value with a T-Shirt.

  • @raghav.bhardwaj
    @raghav.bhardwaj 3 роки тому

    Not only I learned About REST API, I also Learned Basics of Express JS. I always wanted to Learn Node + Express, Now you have motivated me to start Learning it ASAP. Thank You.

  • @trancecoremedia
    @trancecoremedia Рік тому +1

    Man, I can't thank you enough for this excellent tutorial! Best in class, keep 'em coming!

  • @voxlz
    @voxlz 3 роки тому +5

    Knew about REST but would love to hear more about the API configuration part at the end!

  • @alexanderm6187
    @alexanderm6187 3 роки тому +4

    Absolutely brilliant! Thank you sooo much for this lesson! :)

  • @unknownperson5578
    @unknownperson5578 11 днів тому +1

    I have been going through multiple chanel since 10 days but got complete required knowledge in this single vide. Thank you so much❤❤❤

  • @PixelZYX
    @PixelZYX 2 роки тому

    I never watched any of your coding tutorials, wow you literally explain everything thank you!

  • @poglord._
    @poglord._ 3 роки тому +13

    Hey, predicted it yesterday. Was just researching about it and then I got this notification. Amazing job man 👍. Now
    I can REST my APIs (see what I did there? )

  • @chinmaymehta8200
    @chinmaymehta8200 3 роки тому +4

    A full tutorial on APIs please! Love the content.❤️

  • @a.human.
    @a.human. 2 роки тому

    As an absolute beginner trying to wrap my head around all these new concepts covering backend tech, I must say this video made the most sense out of all the other vids on yt on RESTful apis. So, thank you!!!
    Btw, anyone passing by this comment... any advice for someone like me who's trying to become a MERN stack dev?

  • @PacifiqueStormz
    @PacifiqueStormz 3 роки тому +2

    It's crazy how he always post a video about a topic that I just have been researching or learning at school 🤯

  • @solomonlijo
    @solomonlijo 2 роки тому +4

    Your tutorials are really nice, thanks for taking time for making these series and videos

  • @Shulkerkiste
    @Shulkerkiste 3 роки тому +217

    Haha, I wrote my exam about REST-APIs a few hours ago :D

  • @pravdasircone1691
    @pravdasircone1691 3 роки тому

    Really appreciate you going into details what each part of the code is doing. Like the call back in the get and the Middleware function etc. Tyvm

  • @bartoszjarczynski438
    @bartoszjarczynski438 2 роки тому +1

    First 3 seconds of video convinced me to like this video because there's no 'hi guys today I'm going to explain you what the API is how does it work and than we gonna build one ourselves so let's jump into it, roll the intro' and than after 20s dubstep intro he would start talking nonsense in different language. So I respect you for respecting our time and going straight to the point.

  • @Amir_ZMI
    @Amir_ZMI 3 роки тому +5

    I have a suggestion... recently I was in a big project and I was confused as hell. We had many arguments and fights about what folder structure to use for our API:
    - Where to put validation?
    - Use validation in express.js way (in the routes like a middleware) or separately?
    - Where to put routes?
    - break routes into different files or one single file? If so, break based on what?
    There are just countless questions to be answered in this regard. The problem also is that nobody makes videos about folder structure for enterprise level applications. It would be great if you could make it a thing.

  • @nizamersoft
    @nizamersoft Рік тому +3

    You nailed it brother. Well done! Thumbs up (Y)

  • @anoodle8319
    @anoodle8319 Місяць тому +1

    I've been using REST APIs forever without knowing the underlying logic! Thank you so much for this video!

  • @VinilDumpala
    @VinilDumpala Рік тому

    An crystal clear explanation of writing an API with Node.js and Express!

  • @nielskersic328
    @nielskersic328 3 роки тому +10

    I would really love to see the full API Gateway configuration!

  • @YTLyZ4RD
    @YTLyZ4RD 3 роки тому +80

    gRPC in 100 seconds please!

    • @claudenirmf
      @claudenirmf 3 роки тому +15

      I'd prefer a video on RPC first and then explain the role of gRPC

    • @_____case
      @_____case 3 роки тому

      I came here to say this.

    • @sajibsrs
      @sajibsrs 3 роки тому

      RPC

  • @AugerHybrid
    @AugerHybrid 3 роки тому

    I thought that it would take hours to get Insomnia working with this Node.js project but they have got things right and for once everything in this tutorial worked fine! Thanks!

  • @sharzy7209
    @sharzy7209 Рік тому

    I'm currently working on my capstone for university and this video was so helpful in explaining how to create an API with Node.js and Express

  • @arturomedina2055
    @arturomedina2055 3 роки тому +18

    Yes, I want to see a full tutorial on that subject.

  • @himo5666
    @himo5666 Рік тому +15

    Can you do a tutorial where you create an API that takes user input and kind of show us the basics of how to handle users?

  • @onkar10046
    @onkar10046 2 роки тому

    what an explanation dude. I am new at node js but no one explained how to create a simple get post api as simple as this. Thank you

  • @BradenJohnYoung
    @BradenJohnYoung 3 роки тому

    Honestly, this is the best explanation of restful apis I've ever seen.

  • @CodingNuggets
    @CodingNuggets 3 роки тому +7

    Simple explanations in a super well-formatted videos from you always. Love your content. Thanks. See you soon!

    • @mrdza96
      @mrdza96 3 роки тому +2

      The time a video lasts hasn't even passed yet. Clearly didn't watch the whole thing.

    • @CodingNuggets
      @CodingNuggets 3 роки тому +2

      @@mrdza96 I watched on 2x and skimmed through. I already know API's thoroughly and it's a vital part of my job. I completely built a robust API from scratch over the past 10 months for the client I'm currently working for and I have built many in the past even for my own projects. I have extensive experience on the backend. Also, I commented quickly to get attention to my channel. No harm in that and just being transparent.

    • @mrdza96
      @mrdza96 3 роки тому +2

      @@CodingNuggets I do not doubt in your experience. I know about REST APIs too. I just tend to watch the whole clip in respect of the work Jeff puts in all of his videos.

    • @CodingNuggets
      @CodingNuggets 3 роки тому +1

      @@mrdza96 He does do amazing work and his editing is always so good. I went ahead and watched the whole video on 2x and didn't skim so it wouldn't hurt his watch time. Appreciate you bringing it to my attention.

  • @sierragutenberg
    @sierragutenberg Рік тому +3

    Fireship: I don't like code generators
    Also Fireship: Let's generate some React Components
    Also Fireship: Let's generate an Electron App

  • @ahnmichael1484
    @ahnmichael1484 Рік тому +1

    You keep saving my life 😭 So many elitist, semi-intentionally poorly explained concepts, and you make them so approachable. It's not the first time I've come to your videos for rescue; it definitely won't be the last!

  • @RNMERIA
    @RNMERIA 3 роки тому

    well everyone here was already clear and aware as to what a restful api is, but still watched it like me to appreciate your hard work and in turn refresh our knowledge

  • @girllovescoding
    @girllovescoding 3 роки тому +4

    Well explained 👌

  • @omemester6985
    @omemester6985 3 роки тому +7

    ORM in 100 seconds please! More specifically sequelize if possible

  • @_PranavDesai
    @_PranavDesai Рік тому +2

    As someone new to all of this, man, this was a blessing!

  • @ravikiranh289
    @ravikiranh289 Рік тому

    I took this information about restful API in my presentation and response I got was awesome thank you so much for providing that much information in just 100 seconds thank you so much ❤️❤️

  • @xp5655
    @xp5655 2 роки тому +28

    Oh sometimes API needs to REST

    • @ScarlettNuvvoTV
      @ScarlettNuvvoTV 2 місяці тому +4

      I need a rest from APIs lmao

    • @hopahop8071
      @hopahop8071 9 днів тому

      REST assured it will get it one day.

  • @FalseDev
    @FalseDev 3 роки тому +6

    I'm here in 15 seconds, never been this early!

  • @DodaGarcia
    @DodaGarcia 3 роки тому

    Damn I just wrote one of those this week!! Hadn’t used Express before and was very pleased with how straightforward it is.

  • @shervinmokthari1251
    @shervinmokthari1251 3 роки тому

    this couldn't have come at a better time!
    Dude you ROCK!

  • @_sevelin
    @_sevelin 3 роки тому +6

    Great video! Now I can REST in peace!

  • @Wakkyguy
    @Wakkyguy 3 роки тому +3

    Golang 100 seconds and beyond!

  • @anthonynganga4221
    @anthonynganga4221 3 роки тому

    Do you believe in signs? Well, I'm starting to. I'm to start a project next week, an eCommerce site and I was planning to use Node as the backend and React on the frontend. I had no idea on how to create the backend, this video just came at the right moment. Thank you.

  • @gloweye
    @gloweye Рік тому

    Creating and maintaining these is my job. Specifically applied for a non-frontend job.
    We use Swagger for automated frontend-end stuff.

  • @ranjan_v
    @ranjan_v 2 роки тому +4

    Thank you very much, its very educationg

  • @ouss
    @ouss 3 роки тому +3

    You should do one on Hasura for graphql, its way easier than rest

    • @Fireship
      @Fireship  3 роки тому +3

      Hasura is awesome, I will make that video eventually.

  • @MotiviqueStudio
    @MotiviqueStudio 2 роки тому

    This was the exact visualization I needed. Thank you.

  • @Jamarraquad
    @Jamarraquad 3 роки тому

    Dude I love you for this. Thank you, I never realised how easy this would be . You just got a new subscriber

  • @mohammadtalha2336
    @mohammadtalha2336 3 роки тому +8

    port in 100 seconds

  • @mangeshgupta5677
    @mangeshgupta5677 3 роки тому +10

    At the age of calling girls, we are calling APIs 😂😅 and API also not giving any response 😂😂😂

    • @maxdegreat566
      @maxdegreat566 3 роки тому

      They are resting, we can call them when they wake up lol

  • @pedeeli177
    @pedeeli177 3 роки тому

    i love you're videos. they are always so compact and spot an.

  • @riimkahack2951
    @riimkahack2951 Рік тому

    thnks a lot, man your explanations are great, i've understood everything you said with absolutely 0 knowledge in JS, keep up you're doing greate !!!!

  • @JackiePrime
    @JackiePrime 3 роки тому +3

    My wife hired a PI because she thought I was having an affair. Truth was I rented the motel to take a rest because I was full after lunch. She sued me and now I’m being transferred to state prison because I decided to represent myself. I can even post bail so I’m staying put.

  • @ForestGramps
    @ForestGramps 3 роки тому +1

    Thank you! I appreciate your vids man. Keep up the great work!!

  • @zero-lpds
    @zero-lpds 3 роки тому

    You what I haven't seen until now in these types of videos (from others). The distinction between URI and URL. I

  • @subhayukumarbala1680
    @subhayukumarbala1680 3 роки тому

    This has been a long awaited video for me... Thanks for making the video ❤️

  • @MJ46.91
    @MJ46.91 3 роки тому

    Thank you so much for the incomparable l'évolution of simplicity ❤

  • @calebnyamwea7123
    @calebnyamwea7123 2 роки тому

    Great 10min of Knowledge. Fast and Efficient

  • @tomasburian6550
    @tomasburian6550 9 місяців тому

    This is literally what I wanted to know. 10/10, would watch again.

  • @unitydeveloperkgk9836
    @unitydeveloperkgk9836 Рік тому

    This was great. Visuals always make it so much easier to understand.

  • @maroben225
    @maroben225 3 роки тому

    Thank god we actually need practical examples like these....it actually give me a desire to go and use nodejs ..i always use flask and django..never hit me to use nodejs