Planning & First Steps | Creating a REST API with Node.js

Sdílet
Vložit
  • čas přidán 28. 11. 2017
  • Time to dive into it! Let's start building our Node RESTful API. Well actually, let's quickly plan it before we start.
    🖥️ Official Website & Courses
    academind.com/courses/
    👨‍💻 Full Node.js Course
    acad.link/nodejs
    👋 Social Media
    / maxedapps
    / academind_real
    / academind_real
    / academindchannel
    💬 Academind Community on Discord
    / discord
    ----------
    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!

Komentáře • 259

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

    Max has been teaching me to be a better developer for three years now! Let's goooo! 😊😊😊😊😊

  • @Kjata316
    @Kjata316 Před 4 lety +4

    THANK YOU for this! Very helpful!

  • @michaelliriano5027
    @michaelliriano5027 Před 3 lety

    Best nodejs walkthrough on CZcams

  • @sadmanchowdhury4165
    @sadmanchowdhury4165 Před 3 lety

    thank you
    Academind
    for this part

  • @MrAuro
    @MrAuro Před 3 lety +18

    I almost never comment on tutorials, but this was a really good tutorial. It was short and I feel like I actually learned things instead of just copying code. 👍

    • @DJCreeperNo1
      @DJCreeperNo1 Před 2 lety

      can confirm,
      i'm working on a site and the front-end was somewhat easy,
      the backend is a nightmare for my mind,
      this really cleared some misunderstanding "hooks" that i had for express JS

  • @michaelffasd23
    @michaelffasd23 Před 6 lety +2

    Excellent tutorial, great for anyone starting out with REST API!

    • @academind
      @academind  Před 6 lety

      Thank you so much for your comment Michael!

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

    mind blowing man, the best tutorial on the youtube platform, beginners and experience both required a explanation like you, hats of you man.... MAX you are a legend. Thanks a lot for this tutorial

  • @ArmandoBN497
    @ArmandoBN497 Před 4 lety +4

    You are awesome! Have made me understand this finally! Keep up the awesome work this really means a lot to me, being able to understand all of this

  • @alexnezhynsky9707
    @alexnezhynsky9707 Před 6 lety +4

    Getting closer and closer to 100k subs! Great job, Max! 👍 Awesome content and presentation. Love your channel!

    • @academind
      @academind  Před 6 lety +3

      That's indeed so awesome Alex, I'm so happy to see how the channels keeps growing thanks to all of you guys! Also thanks a lot for your amazing feedback :)

  • @AbhishekKumar-mq1tt
    @AbhishekKumar-mq1tt Před 6 lety +8

    Thank you for this awesome series and also make social network website like Facebook with nodejs, express, mongodb. I every day waiting for your video's

  • @simonty1811
    @simonty1811 Před 5 lety +4

    thankyou for this serious

  • @jojojawjaw
    @jojojawjaw Před 6 lety +1

    Thanks a lot. You're the best.

  • @icitywork7731
    @icitywork7731 Před 6 lety

    Keep them coming, can 't wait for the next one :)

    • @academind
      @academind  Před 6 lety +1

      Awesome to read that you like the series, next part coming soon!

  • @BudiSantoso-er6cq
    @BudiSantoso-er6cq Před 5 lety

    Nice Tutorial, thanks..God Bless You..

  • @israelruas948
    @israelruas948 Před 4 měsíci

    Thank you so much for all your help.

  • @mj25423
    @mj25423 Před 4 lety +3

    You are amazing. Thanks a lot for the tutorials, it is so so simple explanation and the first time without any hiccups something works without set up issues!

    • @academind
      @academind  Před 4 lety

      Happy to read that, thanks a lot!

  • @oilcanbland
    @oilcanbland Před 4 lety +9

    Max, I love you man! Been taking your courses for a couple years now. As of Feb 2020, is this serious still still wiable and up to date? Thanks dude!

  • @tarasenkoalexander4607
    @tarasenkoalexander4607 Před 5 lety +5

    For newcomers: You can use
    server.use(app); // app is imported from app.js
    server.listen(8000, () => {
    console.log('App is listening on port 8000!')
    });

    • @shwetadubey9238
      @shwetadubey9238 Před 4 lety

      can you tell me what is the differnce beween this code and Max sir coe because i am in newcomers in node js

    • @shwetadubey9238
      @shwetadubey9238 Před 4 lety

      Thnku but this code worked it

  • @arshamazami159
    @arshamazami159 Před 4 lety

    Thank you for your useful courses thank you 😊

  • @Shree79124
    @Shree79124 Před 6 lety

    Great man.. Now I finally decided to create API's with NodeJS .

    • @academind
      @academind  Před 6 lety

      Awesome! Thanks for your great feedback Sachin!

  • @amikkaaski9107
    @amikkaaski9107 Před 2 lety

    This video is the most apt to my project even after 4 years of its release. Just want to say thank you, to Academind!

  • @LesJoee
    @LesJoee Před 6 lety

    that's helpful.thanks man you doing well

    • @academind
      @academind  Před 6 lety

      Thank you so much for sharing this Jesse :)

  • @SampathLokuge
    @SampathLokuge Před 6 lety

    Supper cool. Thanks a lot Max :)

    • @academind
      @academind  Před 6 lety +1

      Thank YOU for your awesome feedback Sampath!

  • @dehsomething
    @dehsomething Před 5 lety

    Max, junge, by far the best tutorials around. I am over 30, never coded before, just got into it like three months ago and learning a lot. Owe you a big deal. Thanks a lot.

    • @academind
      @academind  Před 5 lety

      Thanks so much Leandro, I wish you all the best on your programming journey :)

  • @mohamedyassinekhlif
    @mohamedyassinekhlif Před 4 lety +1

    Keep up the good work dude ;)

  • @manmohangupta6905
    @manmohangupta6905 Před 6 lety

    Sir you are really great I have ever seen such type of teaching way like you thanks so much for making people happy and evolve the world using technology .
    I am from india and u are really great thanks so much again and namaste ..

    • @academind
      @academind  Před 6 lety

      Thank you so much Manmohan, that's just amazing to hear! :)

  • @fareed7753
    @fareed7753 Před 2 lety

    A perfect teacher to learn any CS technology! Keep it up Man!

  • @ezzoubeirelasraoui7839

    Thank you so much sir !!!!!

  • @abdulrahamanolatunde6548
    @abdulrahamanolatunde6548 Před 8 měsíci +2

    Hi Maximilian, thank you for all the knowledge you have being pouring out. This is the second programming language I will be learning with your materials. The first one was from Udemy and I really enjoyed it.
    Talking of PHP, I'll like to ask if you have a PHP course for building Restful APIs. If yes, please share the link as I've looked around for it and can't find it. If no, do you have plans of making one soon?

  • @lightlover78
    @lightlover78 Před 4 lety

    Thank you!

  • @rotrose7531
    @rotrose7531 Před 6 lety +1

    Thank you, it gives me what api is for the first time. Please create more and more enlightening tutorials like this.

    • @academind
      @academind  Před 6 lety

      Thanks for your awesome feedback! I'll try my best!

  • @hamzajaved6110
    @hamzajaved6110 Před rokem

    Thanks learn a lot from your vedio 😎 amazing bro

  • @dmytro.turskyi
    @dmytro.turskyi Před 8 měsíci +1

    Hi Maximilian, thank you for the informative video on creating a REST API with Node.js. I found your explanations and step-by-step process really helpful.
    I noticed that you used pure JavaScript for your backend application. I was wondering what your thoughts were on using TypeScript instead. TypeScript has some great benefits like static typing and improved code maintainability. Was there a specific reason why you chose not to use TypeScript in this particular project?
    I'd love to hear your perspective on this. Thanks again for sharing your knowledge through these videos!

  • @jamesgarcia5221
    @jamesgarcia5221 Před 4 lety

    Nice one, thank you

  • @dragomirtachev5553
    @dragomirtachev5553 Před 6 lety

    Love the way you show how things add up and they way they fit together

    • @academind
      @academind  Před 6 lety +1

      Thank you, makes me really happy to read that you like my explanations!

  • @vinothkumarv9722
    @vinothkumarv9722 Před 3 lety

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

  • @shubhamdubey4691
    @shubhamdubey4691 Před 5 lety +1

    I see Max , I like the video.

  • @bashar042
    @bashar042 Před rokem

    You are awesome!!

  • @sarimali8853
    @sarimali8853 Před 4 lety

    Excellent 👌👍 brother

  • @bloxzyo
    @bloxzyo Před 2 lety +4

    Why does he use both express and http? Express is enough to get the job done in this video..... I am confused....

  • @nareshkollipora5323
    @nareshkollipora5323 Před 3 lety

    Helpful Lecture

  • @ambyudo6958
    @ambyudo6958 Před 6 lety

    Thank you for your tutorial, how can we implement NodeJS- base API which will give the results of an SNMP poll of a remote server, having snMp community string, snmp OID1 and snmp OID2, remote server IP any address with port 161, Thanks

  • @aiduongtran6653
    @aiduongtran6653 Před 5 lety

    thanks a lot bro

  • @ramithalasath8791
    @ramithalasath8791 Před 3 lety

    Thank you very much for this tutorial series. It's very helpful and it's same as my project 😁

  • @fmaransatto
    @fmaransatto Před 6 lety

    awesome!

  • @jerrysmith3014
    @jerrysmith3014 Před 4 lety

    Max awesome content! I'm researching a Reference error: Process is not define. I'm researching this but the documentation is not clear to me. Any Help is received with gratitude.

  • @UsamaKhan-um3nr
    @UsamaKhan-um3nr Před 6 lety +1

    your knowledge is awesome and also have neat and clean voice also good your explanation about any topics.
    thank you.

    • @academind
      @academind  Před 6 lety

      Really great to read that Usama, thank you very much for your wonderful feedback :)

  • @cinquain0
    @cinquain0 Před 5 lety

    Fire!

  • @logicstv
    @logicstv Před 4 lety

    This setup of express server , is it something that shroud be perceived as intuitive or I should memorize the code?

  • @daniellaerachannel
    @daniellaerachannel Před 6 lety

    great teacher

    • @academind
      @academind  Před 6 lety

      Happy to read that, thank you very much!

  • @isoplayers
    @isoplayers Před 5 lety

    I saw a SO post saying that "--save" is no longer needed because it automatically adds the dependency to package.json. For some reason, it doesn't work for me. So is it still needed?

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

    This is helpful, also purchased angular course on Udemy. Love your teaching style.

  • @kalpeshpatil741
    @kalpeshpatil741 Před 3 lety

    good information :)

  • @Ecdetails
    @Ecdetails Před 6 lety

    Think about everything max does support him by getting his courses on udemy they are all amazing thanks for this tutorial

    • @academind
      @academind  Před 6 lety

      Thanks so much for your great feedback and for your support here and on Udemy Eddie! This honestly means a lot to me!

  • @Andrey-il8rh
    @Andrey-il8rh Před 6 lety

    Max, did you think of using babel-watch inside the project? It allows using 'import' style syntax as well as all new but yet unsupported features of ES 2017

    • @academind
      @academind  Před 6 lety +3

      I considered a more complex setup but decided against it to keep the project/videos focused on the core of the series, which of course is building the RESTful API itself

  • @shyarxelil1987
    @shyarxelil1987 Před 4 lety +2

    Why dont you use express instead of using http module? For example you could just like so:
    const express = require('express')
    const app = express()
    const port = 3000
    app.get('/', (req, res) => res.send('Hello World!'))
    app.listen(port, () => console.log(`Example app listening on port ${port}!`))

  • @pigpig333666999
    @pigpig333666999 Před 6 lety

    太棒了!

  • @sarimali8853
    @sarimali8853 Před 4 lety

    It's working

  • @andreasweber952
    @andreasweber952 Před 4 lety +1

    I am using the vscode Extension "Rest Client" instead of Postman which is good to share the API Requests which each other working on the same code.

  • @Alpha777beta
    @Alpha777beta Před 5 lety

    Awesome

  • @lesegoseikali2422
    @lesegoseikali2422 Před rokem

    When creating the "app.use" what does the => represent?

  • @kurtke1990
    @kurtke1990 Před 5 lety

    Does anyone know what is difference using app.listen(port) and using http to create a server and listen to the port ?

  • @ManishYadav-qe6lk
    @ManishYadav-qe6lk Před 6 lety

    i am getting events.js:183 error can you help me and how to remove all ready used port

  • @elprincipito1704
    @elprincipito1704 Před 6 lety

    Hello there!! I am trying ot create my restful Api resources using node js, howvere our compnay uses apache web server. Do i need to install Node js in our server? or can i just use the methods you are curently expaling and installl node js as a dependency in my project. Thanks! Tonathiu

  • @suryachaturvedi5036
    @suryachaturvedi5036 Před 5 lety +3

    not working. server is running but not showing on local host

  • @peekpt
    @peekpt Před 6 lety +2

    I use RESTFUL APIs on mobile apps but never ever built a restful server. I am learning from you. Also following your tip and learning Vue . I have a question: I'm having trouble in memorizing all the different programming languages syntax . I do C for micro controllers, swift for iOS, now javascript, including css html. How do you do it? what is your trick? Thank you Max.

  • @noohusyed
    @noohusyed Před 6 lety

    I installed node express with sucess, in server.js im getting red squigly(sorry for spelling) under re in require('http'). Am i missing somethkng?
    Thanks

  • @shwetadubey9238
    @shwetadubey9238 Před 4 lety

    TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them..i got the error when run on node js..please help me

  • @shwetaverma4770
    @shwetaverma4770 Před 4 lety

    Sir I am not able to see part 1 of this API series..can you share the link of part 1

  • @yakut54
    @yakut54 Před 3 lety

    Спасибо за науку! Разговорный английский плохо понимаю, но тут всё интуитивно понятно )

  • @shivamkakkar27
    @shivamkakkar27 Před 4 lety

    Welcome back to this serious

  • @michaelrandall6954
    @michaelrandall6954 Před 3 lety

    Hello Max, I see that you are running this, I assume on a local machine. How would I deploy this to an azure resource. I have limited access to azure resources, but I was thinking that I could create a ubuntu linux vm and would I install apache and then bundle this code and put it in the http directory or would I install node on the linux box and then not sure of my options.

  • @nicklowe_
    @nicklowe_ Před 4 lety

    This is a great serious

  • @stanlyqqark5744
    @stanlyqqark5744 Před 6 lety +2

    Спасибо за уроки!

  • @yigitruzgaruzun7289
    @yigitruzgaruzun7289 Před 4 lety

    You are wonderful. ı speak foreign language than you. but you taught this lesson to me awesome. Thanks

  • @mq101t
    @mq101t Před 6 lety +16

    thanks for this video is so cool,but way you make a server in native node and don't use express "app.listen(port ,function () {
    console.log('listening at ' + port);
    })"
    it just question ?
    and thanks again :)

    • @jakubrpawlowski
      @jakubrpawlowski Před 6 lety +2

      I always wondered about the same thing when watching last two express series on this channel. Why not just app.listen Max?

    • @academind
      @academind  Před 6 lety +10

      Simply a habit - you can use both, that's absolutely true

    • @jakubrpawlowski
      @jakubrpawlowski Před 6 lety

      Thanks for a quick reply as always! Do you ever REST? :P

    • @Andrey-il8rh
      @Andrey-il8rh Před 6 lety

      Not really an efficient habit, though. I agree with other guys that this pattern feels odd

    • @jakubrpawlowski
      @jakubrpawlowski Před 6 lety

      Andrey Bogdanov actually I realized that if you want to have http, https and websockets all using one connection then you need to do it the http.createserver way :p

  • @MayOcampo
    @MayOcampo Před 6 lety +12

    I got no response on linux mint... got timeout error... what am i missing here?

    • @gaborballa9614
      @gaborballa9614 Před 4 lety

      100% work on linux mint

    • @viniciusvelloso1575
      @viniciusvelloso1575 Před 4 lety +3

      In my case, it was a typo ('http.createServer()' instead of 'http.createServer(app)').

    • @shakhawathossainshahin1225
      @shakhawathossainshahin1225 Před 3 lety

      @@viniciusvelloso1575 thanks man. saved my day...

    • @mattdaroo2790
      @mattdaroo2790 Před 3 lety

      I ended up using server.listen(3300); use app.listen(3300, () => console.log(`Listening on port ${port}...`));
      This will use the express server, not the http server.

    • @mattdaroo2790
      @mattdaroo2790 Před 3 lety

      @@viniciusvelloso1575 That's true and it works. I completely missed it in the video when he typed the app as a parameter

  • @shreshthsingh7744
    @shreshthsingh7744 Před 4 lety

    I hope these APIs could also be used in flutter?

  • @akapoolka8325
    @akapoolka8325 Před 6 lety

    Why can we omit file extension at 11:01? We don't use web pack, which as you, Max, have explained in React course on Udemy, handles the file extensions, including .js and .jsx files. Did you I misunderstand you?

    • @20cmusic
      @20cmusic Před 6 lety

      'require' is one of the core functions of node.js. If there is no file extension, require function automatically add '.js' at the end of the parameter.

  • @jayem3662
    @jayem3662 Před 6 lety

    thank you for the tutorial.
    btw, is the server.js is necessary if I'm in react native for mobile dev and planning to use this tutorial? I mean, that "http" thing.
    please reply, I would appreciate so much. :)

    • @academind
      @academind  Před 6 lety +1

      You need to spin up the Node.js server - the file can be named whatever you want though. But the content is important, yes

  • @antonioguiotto529
    @antonioguiotto529 Před 5 lety

    bro u damn good at what u do

    • @academind
      @academind  Před 5 lety

      Thanks so much Antonio, this really means a lot to me!

    • @antonioguiotto529
      @antonioguiotto529 Před 5 lety

      @@academind by the way your current logo rock balls

  • @cruzjurado5471
    @cruzjurado5471 Před 6 lety +2

    What is that package-lock file when you add express? (min 5:24 aprox)

    • @MrEffg
      @MrEffg Před 6 lety +4

      package-lock.json is automatically generated for any operations where npm modifies either the node_modules tree, or package.json . It describes the exact tree that was generated, such that subsequent installs are able to generate identical trees, regardless of intermediate dependency updates. (c) npm documentation

    • @cruzjurado5471
      @cruzjurado5471 Před 6 lety

      thanks!

  • @mdvenkateshnuhk8034
    @mdvenkateshnuhk8034 Před 6 lety

    Thanks
    but i am little confused about what will be the 3 rd parameter that browser takes in app.use((req,res,next) [i mean next parameter ]

    • @romainjacquel1698
      @romainjacquel1698 Před 5 lety

      next moves to the next operation.
      function Todo () {
      // Your code
      next ()
      }

  • @ambientsoda106
    @ambientsoda106 Před 3 lety

    but if I host node on a goddady server, in need to use node on my laptop to setup the files then use ftp to put them on the server - you cant work on node js as you are on the say goddady server..

  • @sujznamatya596
    @sujznamatya596 Před 5 lety

    I tried the same code and the page does not works where as i did
    const server = http.createServer(app);
    but does not works. any suggestion plz

  • @ivan89pln
    @ivan89pln Před 4 lety

    Hello, nice video but i only dont understand why you start the app using pure nodejs code instead of expressjs ? Is there any reason for that ?

  • @MS-xu1ks
    @MS-xu1ks Před 4 lety

    Can't we use PUT instead of PATCH?

  • @UsamaShafqatKhan
    @UsamaShafqatKhan Před 5 lety

    I’m using the vs code and I’ve installed the recommended extensions for work with node js but i don’t get the intellisense like yours.

    • @ss2851
      @ss2851 Před 4 lety

      Install required package from within VS Code

  • @paulwillisorg
    @paulwillisorg Před 6 lety

    This is a good serious

    • @academind
      @academind  Před 6 lety

      Happy to read that you like it, thank you!

  • @searchbarwebs
    @searchbarwebs Před 6 lety

    Will this series get me going with Node.js if i havent used it before?

    • @academind
      @academind  Před 6 lety

      Maybe to some extent but I won't dive into all the Node.js basics in this series. I got another series that does that: czcams.com/play/PL55RiY5tL51oGJorjEgl6NVeDbx_fO5jR.html (audio quality unfortunately is a bit bad, sorry about that)

  • @saisreenivas1003
    @saisreenivas1003 Před 6 lety +1

    max can you explain callback hell in nodejs and how to avoid it

    • @academind
      @academind  Před 6 lety +1

      Hi, check this video - it should explain everything you need (it applies for Node.js, too): czcams.com/video/jgWnccjXR4I/video.html

  • @wederpacheco1470
    @wederpacheco1470 Před 6 lety

    Max, i am still missing a node.js complete udemy course. Can we hope for it any time in a close future? That would be neat! Great video btw!

    • @academind
      @academind  Před 6 lety +1

      No concrete plans as of now to be honest but we'll see - Node certainly is an interesting topic. Thank you for your comment Wéder, awesome to read that you like the video!

    • @PavanKumar-vu2mm
      @PavanKumar-vu2mm Před 6 lety

      Yes! We need a course from you on nodejs and mongodb!

  • @dijitaldurum7160
    @dijitaldurum7160 Před 5 lety

    who faces with the =>(unexpected token) problem ?

  • @67Diadem
    @67Diadem Před 4 lety +2

    localhost:3000 is not working in postman and in web browser.. please help!!!

    • @mattdaroo2790
      @mattdaroo2790 Před 3 lety

      Instead of server.listen(3300); use app.listen(3300, () => console.log(`Listening on port ${port}...`));
      This will use the express server, not the http server.

    • @mattdaroo2790
      @mattdaroo2790 Před 3 lety

      @11:13 It should be http.createServer(app); and not http.createServer();

  • @nabeeltahir6013
    @nabeeltahir6013 Před 5 lety

    Humble request to make tutorial ticket system using Laravel

  • @88noname88
    @88noname88 Před 4 lety

    Do you know why he using http wrapper. We can use express app.listen(PORT) without http library

  • @user-zb5jp4ti1d
    @user-zb5jp4ti1d Před 6 lety

    Max... may i ask a quick query abt nomenclature... REST and RESTful... when do we use one or the other

  • @ss2851
    @ss2851 Před 4 lety

    Why cant we use sessions in SPA?? People are using it with Angular.

  • @brotherx6205
    @brotherx6205 Před 5 lety +4

    could this work with a react js application?

  • @kousikmitra129
    @kousikmitra129 Před 6 lety

    Which vs code extensions are you using?

    • @academind
      @academind  Před 6 lety

      I only use the "Angular Essentials" pack