Adding More Routes to the API | Creating a REST API with Node.js

แชร์
ฝัง
  • เผยแพร่เมื่อ 30 พ.ย. 2017
  • Our RESTful API needs more Routes! Learn how to add more routes to our Node + Express project!
    Join the full Node.js course: acad.link/nodejs
    Check out all our other courses: academind.com/learn/our-courses
    ----------
    Full Playlist: academind.com/learn/node-js/b...
    Source Code: academind.com/learn/node-js/b...
    ----------
    • Go to www.academind.com and subscribe to our newsletter to stay updated and to get exclusive content & discounts
    • Follow @maxedapps and @academind_real on Twitter
    • Join our Facebook community on / academindchannel
    See you in the videos!
    ----------
    Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!

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

  • @user-ed5lw8lz2i
    @user-ed5lw8lz2i 6 ปีที่แล้ว +115

    If there is a heaven, there is already a place prepared for you. All your works are amasing

    • @academind
      @academind  6 ปีที่แล้ว +24

      Thank you so much for your beautiful comment, it really means a lot to me to get such an amazing feedback :)

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

      Yes, This is 100% True. Max has a place in the Haven already. Awesome content. Thank you Max :D

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

      Really... Just take a bow... Just amazing tutorials

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

      Very very nice and God bless you!

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

      very true, may god bless you with good health and wealth, thank you.

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

    Thank you very much! Your course is even better than the paid ones. The content of it is great and your teaching skills are amazing, you really know how to communicate your vast knowledge and that´s a virtue only a few have. You helped me a lot!

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

    I like how serious this is getting :)

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

    Super compact tutorial. I'm shadowing you work and every few movies I'm reading the documentation to understand methods you're using :) Great work!

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

    The way you organize the codes regarding the endpoints (products, orders etc) is legendary.

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

      So cool to read that, thanks so much for your comment!

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

    Excellent content and the way you talk and explain is perfect! Thanks a lot!

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

    Knowledge is the most valuable thing you can share. And its for free here. Amazing stuff.

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

    absolutely love this. super easy to follow so far!

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

    That is probably the best node.js tutorial I’ve seen on TH-cam

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

      Wow, so happy to read that James, thank you very much!

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

    You just saved my project since our teacher had to quit work due to covid in order to look after his daughter we have no lessons.
    Thank you!

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

    Thank you for your time and efforts! Thank you for the knowledge!

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

    More more more! :) Just can't get enough! :) Thanks Max!!!!

    • @academind
      @academind  6 ปีที่แล้ว

      More to come! Thanks so much, I'm glad that you're liking it!

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

    You are just awesome, in basics of node series you started with basic http working of node and then with advance express. And the best thing is your project structure.

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

      Wow, this really means a lot to me Kuldeep, thank you so much!

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

    Brother,Teacher whatever i am a student and learning from you. I just want to tell you that You are the Best.

  • @Aryan-ji2nk
    @Aryan-ji2nk ปีที่แล้ว

    Been 5 years, and still no tut in my opinion is as good as this tut (mixture of theoretical and practical knowledge)

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

    I liked the video before even seeing it because I knew he will explain it in the best way

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

    Thanks thanks thanks thanks thanks thanks thanks .............................
    I was looking for this kind of quality video. Wanted to switch from python to JavaScript backend dev and this video clearly helps in creating the REST APIs like we create in Flask using blueprints.
    Thankyou very much again. :)

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

    This playlist is amazing. Thanks for your work. Love from Belgium.

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

      It's really fantastic to read that you like the series! Thank you for your comment and all the best from Germany :)

  • @jewbarrymore_
    @jewbarrymore_ 6 ปีที่แล้ว

    Hi Max, please make it a long series! Loving it!

    • @academind
      @academind  6 ปีที่แล้ว

      More videos to come Tamás, no worries, really happy to read that you like it!

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

    Your amazing tutorials are amazing, thanks for being an Ehrenmann!

  • @jakubrpawlowski
    @jakubrpawlowski 6 ปีที่แล้ว

    Fantastic work Max! Thank you so much!

    • @academind
      @academind  6 ปีที่แล้ว

      That's really great to read Jakub, thank YOU for your amazing comment!

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

    Man, you are an amazing teacher kindly place more videos and special projects like how to make a movie database search engine. THANK YOU SIR

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

    You don't understand how awesome you are!! Thank you !

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

      Thank you so much Gavin :)

  • @BudiSantoso-er6cq
    @BudiSantoso-er6cq 5 ปีที่แล้ว

    I have downloaded this tutorial videos(#1- #14), and it is very useful for me, thank you ... God bless you

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

      Awesome to read that Budi, thank you for your support!

  • @israelruas948
    @israelruas948 4 หลายเดือนก่อน

    I am learning step by step. Very helpful

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

    This tutorial starts to look promising... Thanks Mate!

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

      So great to read that, thanks a lot for your comment!

  • @kamalze6302
    @kamalze6302 6 ปีที่แล้ว

    This is amazing ! Thank you for this series.

    • @academind
      @academind  6 ปีที่แล้ว +2

      YOU are amazing Kamal, thank you so much for your awesome feedback!

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

    Great !!! Thank you for your time and effort. Really usefull lesson for me !!!

  • @nelsonx73
    @nelsonx73 6 ปีที่แล้ว

    Excellent video. Looking forward for the coming ones. Thank you Max

    • @academind
      @academind  6 ปีที่แล้ว

      Thank YOU for your feedback Nelson, happy to read that you liked it. More to come next week :)

    • @nelsonx73
      @nelsonx73 6 ปีที่แล้ว

      Thank you :)

  • @fahad.hossain
    @fahad.hossain 6 ปีที่แล้ว +2

    Hello Maximilian sir, Thank you very much.

    • @academind
      @academind  6 ปีที่แล้ว +1

      Thank YOU for your comment Fahad :)

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

    Your content is truly amazing :)

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

    I liked very much node RESTful API all videos. Please Implement to all API to angular 6.it is very useful for every one.

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

    Thank you Max!
    I want be like you when I grow up!

  • @rotrose7531
    @rotrose7531 6 ปีที่แล้ว +1

    Thank you, you explain it great!

    • @academind
      @academind  6 ปีที่แล้ว

      Thanks so much, really great to hear that!

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

    Thank you so much MAX

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

    Great tutorial, very clear, easy to follow.

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

      Happy to read that, thank you!

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

    most serious course on youtube

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

    This is truly amazing, Good Work!!!, and thanks

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

      Thanks so much for your great feedback!

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

    Your tutorials are the best . i really like your way of teaching

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

      That's so cool to read Usama, thank you very much for your awesome feedback!

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

    You are the BEST . Boss just awesome. Love your work. Thank you for your awesome tutorial.

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

      Thanks so much!

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

    Just came here to learn about node js and express, but then I got to enjoy your accent too

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

    thank you man!

  • @MarcosLopez-bs6xr
    @MarcosLopez-bs6xr 3 ปีที่แล้ว

    he says series like "serious" and I'm here for it

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

    Wonderful✨😍 heartiest thank you so much sir,

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

    Man you are great, Thank you

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

    Again and again Bro you are great did well.. very good explanation.... love you brother. :)

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

    nice serious man ... keep it up

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

    Thanks for the video

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

    I never thought I'd be learning NodeJS from Seth Rogan. Sweeeet.

  • @codenamecobweb4476
    @codenamecobweb4476 6 ปีที่แล้ว

    Awesome video lesson, thanks!!!!

    • @academind
      @academind  6 ปีที่แล้ว

      Thank you so much for your comment!

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

    Thanks!

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

    May I recommend nodemon. I automaticaly restarts the programm when a change is made in the code.

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

    Thank u so much for this great tutorial, I have one query that, when I am consuming this rest API in angular 8 app, not getting the data into post method while with POSTMAN it's working fine.

  • @mybootscamewithoutstraps
    @mybootscamewithoutstraps 5 หลายเดือนก่อน

    Max has taught me so much shit. Dude's a goddamn legend.

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

    thank you for the series, if anyone using express a newer version of express replace this line to code
    app.use('/', routes);
    with
    app.use(app.router);
    routes.initialize(app);

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

      or at the end of the product.js add module.exports = router;

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

      const id = req.params['productID'] instead of const id = req.params.productID

  • @Andrey-il8rh
    @Andrey-il8rh 6 ปีที่แล้ว

    Hi Max! Thanks for the video, tuned for the next one. Do you plan to add API testing to this set of tutorials?

    • @academind
      @academind  6 ปีที่แล้ว

      Maybe not to this set (though that's not decided yet, I'm still recording) but it is something I might cover in the future. Testing in general actually

    • @Andrey-il8rh
      @Andrey-il8rh 6 ปีที่แล้ว

      Yes, testing is always a rarely covered topic

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

    Heaven doesn't deserve you! THANK YOU

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

    Thank you

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

    Thank you kindly for these tutorials! A minor setup question of mine is what extensions you use for your VS Code? Is it built in or what enables all those informative function parameter requirements?

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

      Thanks a lot for your great feedback Toni. We don't use any special extensions as you can see here: th-cam.com/video/VqCgcpAypFQ/w-d-xo.html

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

    what shortcut key do you use to create new-file or new-folder without using mouse in VScode ?

  • @idaliahernandezgalvan8324
    @idaliahernandezgalvan8324 6 ปีที่แล้ว

    Hi Max, excellent video. I have a doubt, why did you use PATCH method instead UPDATE?? Which is the different between both methods?? Thanks

    • @academind
      @academind  6 ปีที่แล้ว +1

      There is no UPDATE method, you use PATCH for updating (and PUT for replacing). :)

  • @i-fixtech8076
    @i-fixtech8076 3 หลายเดือนก่อน

    to be honest I never comment but your work is amazing

  • @user-tj5tk8io9q
    @user-tj5tk8io9q 7 หลายเดือนก่อน

    thanks,sir

  • @mariannyguerra2163
    @mariannyguerra2163 6 ปีที่แล้ว

    preaty well explained! :D

    • @academind
      @academind  6 ปีที่แล้ว

      Thank you Marianny :)

  • @btnkumar
    @btnkumar 6 ปีที่แล้ว

    Thank you very much for good tutorials :) .Which IDE do you use?

    • @academind
      @academind  6 ปีที่แล้ว

      Thank you for your comment Taraka! I use Visual Studio Code in this video.

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

    Hi .. What should we do to use the express api on different servers... How should we write code to get the url in the api json on a different server in img fil

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

    I have question @academind. How can i update the productImage? How can i upload a new file

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

    hey!...will it create much difference if I use Mysql instead of mongo?

  • @persegona77
    @persegona77 6 ปีที่แล้ว

    Great content Max. BTW, how to you like using Visual Studio Code, are you thinking about changing from WebStorm?

    • @academind
      @academind  6 ปีที่แล้ว

      I basically switched, yes. Some parts are still missing/ better in Webstorm but VS Code is faster and I like working with it. If auto-imports and code formatting gets bit better, there'll be nothing I miss

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

    You da man sir

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

      YOU are the man James, thanks a lot for you support!

  • @victorNDSL
    @victorNDSL 6 ปีที่แล้ว

    Hey Max, quick question: Why did you use the http package for the actual server? Why not use express for that?

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

      Im guessing because there are multiple ways to do this and this is his approach.

  • @ShiniBliz
    @ShiniBliz 6 ปีที่แล้ว

    Thank you Max, please make a video explaining module.export and export.

    • @academind
      @academind  6 ปีที่แล้ว

      Thanks for your suggestion. Basically module.exports is the Node.js export syntax. Just "export default ..." or "export something" is ES6 export syntax which currently is not supported by Node (but will be in the future)

    • @ShiniBliz
      @ShiniBliz 6 ปีที่แล้ว

      Academind I was talking about this little topic :
      medium.freecodecamp.org/node-js-module-exports-vs-exports-ec7e254d63ac
      Sorry for promoting another person in your videos.
      Thank you for your answer

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt 6 ปีที่แล้ว +3

    Thank u for this awesome video .Can u make project on how to download file/document and upload file/document from mongodb database

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

      Yep, I'll probably add some functionality along these lines. Either to that project or to a separate one.

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

    Nice Man..

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

    Just wondering what database you plan to use for this series. Do you plan on using a service like Firebase or doing your own database? Since it's Node, I assume you'd be using MongoDB.

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

      I'll use MongoDB, though I might also add some bonus videos once the series is done to show some other DB integrations. Not something I can promise as of now though

    • @Andrey-il8rh
      @Andrey-il8rh 6 ปีที่แล้ว

      Will it be just pure Mongo or you will utilize Mongoose layer?

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

      Any Hope to see SQL as Database ?

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

      @Jack Rong Well opinions never cost.

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

    When i adding a new user router,"falied to lookup views",this error raised,how to slove this...

  • @mooodddy1
    @mooodddy1 6 ปีที่แล้ว +13

    Please insert authentication in this series + Outh with Facebook && GOOGLE

    • @academind
      @academind  6 ปีที่แล้ว +14

      I will add auth, no worries. Probably JWT though

  • @qaipak1
    @qaipak1 6 ปีที่แล้ว

    Someone explain 11:45 he says he doesn't put returns there but I thought arrow functions automatically had returns implicitly.

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

    Cant we use express for running server.. like let app = express(); then app.listen(port) ???

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

      True, it is strange he uses app.js as a component, rather than a main running script. There are some other doubtful nuances in his code as well.

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

    Крутые видосы! спасибо!

  • @SaladoElFede
    @SaladoElFede 6 ปีที่แล้ว

    Tell me you're gonna make authentication and authorization (roles & permissions) for these series, with Json Web Tokens and CSRF/XSS mitigation techniques! :D That would be perfect!
    Also, what do you think about Strongloop's Loopback?

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

    Super video..... its.... fantastic

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

      So cool to read that, thanks a lot!

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

    please can you do a tutorial on customer and cleaner api with node i would be grateful

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

    anh dạy rất hay ạ!

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

      Thank you :)

  • @daniellaerachannel
    @daniellaerachannel 6 ปีที่แล้ว

    great!! 👍

    • @academind
      @academind  6 ปีที่แล้ว

      Thank you :)

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

    Why creates the server.js file instead of using app.listen(3000...) on the app.js file?

  • @jejaquez
    @jejaquez 6 ปีที่แล้ว

    Hi Max, do you think visual studio code is better than webstorm?

    • @academind
      @academind  6 ปีที่แล้ว +1

      Hi Jonathan, I think it is still a personal preference, but I also think that Visual Studio Code evolved greatly in the last months, so right now I personally prefer using it :)

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

    Instead of using http.createserver(), why didn't you just use const server = express() ?

  • @andy60133
    @andy60133 3 หลายเดือนก่อน

    when you used Patch and delete method you didnt use req.params.ID and you didnt get error but i did... than i added it and it ran..why

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

    Dear sir ?
    " res.status is not a function " Why is this error ? but i have successfully routed product but I use same code in order page ? please help me

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

    I thought next was only for middleware?

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

    Why do we need pass 'next' parameter to routes? we don't use it xD can we just write "route.get('/', (req, res) => ..." ?

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

      Router is middleware, and every middleware must have "next function". You must pass router to app.use() method and that method accepts only middleware functions. Go to express documentation and read. I hope that my answer helps a little. ;)

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

    Cannot find module '.api/routes/products'

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

    My English is not good, but I like your video. Thank you. By the way, I can also learn English^_^

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

      Happy to read that Ming, thank you for your nice feedback ;)

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

    Hii, I am getting the following error while installing express. Error: npm ERR! Unexpected end of JSON input while parsing near '...cha":"~1.18.2"},"dist'. Anyone can help on that

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

    kindly let me know which visual studio edition is this. The one I downloaded does not have some imp features.

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

      Just the default VS Code (not Visual Studio) version including the Material Icon Theme and the Angular Essentials extension by John Papa.

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

      @@academind thanks a lot for prompt response and tons and tons of thanks for great and best tutorial.

  • @MrAvatarvb
    @MrAvatarvb 6 ปีที่แล้ว

    Hello, your are so great teacher. why not use nodemon. to avoid the server reboot :)

    • @academind
      @academind  6 ปีที่แล้ว +1

      It'll be added soon :)

  • @wederpacheco1470
    @wederpacheco1470 6 ปีที่แล้ว

    VSCode? Cool!

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

      Yep, I switched - it's now at a point that it's really good in my opinion

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

    if you using nodemon you dont have to restarting the server.js. Nodemon automatically do it after changes.

  • @daniellaerachannel
    @daniellaerachannel 6 ปีที่แล้ว

    great series! can't wait for a new one maybe creating a online shoes store or hotel reservation website or something like that. if you create a udemy cours elet me know, I'll buy soon! thanks

    • @academind
      @academind  6 ปีที่แล้ว +1

      Thanks again for your great feedback and for your project suggestions! I might create more content about Node in the future but I cannot share anything specific at the moment :)