How to Build a REST API with Node JS and Express

Поділитися
Вставка
  • Опубліковано 30 тра 2022
  • View the Code & GitHub Repository:
    dcode.domenade.com/tutorials/...
    INSOMNIA DOWNLOAD:
    insomnia.rest/
    🎓 JAVASCRIPT DOM CRASH COURSE:
    www.udemy.com/course/the-ulti...
    In today's video we're going to take a look at how easy it is to build a simple REST API using Node.js and the Express framework. This API is going to allow users to post comments to a web server, as well as retrieve a comment once posted.
    This project is perfect for beginners who want to dive into the world of building RESTful APIs, and is purposefully simple for those getting started.
    🏫 My Udemy Courses - www.udemy.com/user/domenic-co...
    🎨 Download my VS Code theme - marketplace.visualstudio.com/...
    💜 Join my Discord Server - / discord
    🐦 Find me on Twitter - / dcodeyt
    💸 Support me on Patreon - / dcode
    📰 Follow me on DEV Community - dev.to/dcodeyt
    📹 Join this channel to get access to perks - / @dcode-software
    If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!
    #dcode #javascript #nodejs

КОМЕНТАРІ • 41

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

    perfect, for some reason i was unable to find any guides that show how to get started as easily as you do. you saved me.

  • @ssteven_johnson
    @ssteven_johnson 2 місяці тому

    I don't comment often on !yt, but this quick tutorial is great! The length of the video is perfect and the instructor speaks in relatable terms and is able to explain almost all of issues one might run into. Great video and content...

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

    Thank you. I am trying to build an api atm, this video came out right on time.

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

    Love your Tutorial, hope more video about Express and Node JS , especially how to secure API and login with JWT

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

    An advanced video as a continuation adding validation and error handling would be good. Thinking always on the worst case scenario is good when creating API endpoints.

  • @itsnobledean9450
    @itsnobledean9450 7 місяців тому

    I was looking to create a simple site so when a employer wanted to leave me a message, I'd receive it, from my resume, you know, with a text area for them to leave me a message. This has helped me understand how to create that.

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

    Great Video.
    Explained really well.
    Thank you!

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

    Thank you, ur explanation is very clearly and to the point

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

    Excellent Tutorial, Thank You Very Much

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

    Great video mate !

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

    thank you a million)) helped me a lot

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

    I'd like to see another video like this one.

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

    Thanks brother for this informative video :)

  • @swapnilkhopade989
    @swapnilkhopade989 5 місяців тому

    Thanks a lot for the video...

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

    great explanation keep it up

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

    very helpful thank you too much

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

    well done!

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

    Excellent tutorial. I had to use Postman instead of Insomnia because my computer is old OS 10.11 (El Capitan).

  • @user-ol4sb3wf2k
    @user-ol4sb3wf2k Рік тому +1

    If you're watching this after May 2023, FS has been removed. To solve the initial run replace the first line with " const fs = require('fs').promises;"

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

    Because the express.json() middleware is already used, res.status(201).json(...); can also be written as res.status(201).send(...); It will work the same.

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

    Good contents am knew in backend REST ApI stuff but am liking this, but by the way does this involve building database service objects with your application Dockerfile as build context using docker compose

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

    I'd love to see database and JWT implementation

  • @dalar2
    @dalar2 3 місяці тому

    This was great, I think if you ever make an updated version be sure to include nodemon, it's doesn't take long to include. Stopping and Starting the server manually all the time.... yuck.

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

    Can i use that for my small ecommerce project? Login system, user records etc?

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

    Do the endpoints persist if I want to keep any processes running between API requests or do they die like serverless functions?

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

    Hey Dom - isn’t 404 error should be in try as we are still sending the right request of 404 and catch should have 500 status code error??

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

    Do you have time to make a video for oauth too?

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

    Great tutorials man... Keep it up!!! The git link for this tutorial is not working.

    • @dcode-software
      @dcode-software  2 роки тому

      Hey, try the GitHub link now - should be working!

  • @Felix-og7pd
    @Felix-og7pd Рік тому

    simple api CRUD
    in-memmory db
    what use of express?

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

    how about if i want to block others from using my api?

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

      Make condition for special key as example

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

    the github link is not working

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

    dom i think the repository is private

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

    is it easy to implement an API in a system?
    I've seen a few companies that require that the candidate applying for that job knows how to create, use, and implement an API with NodeJS.
    I'm focusing on front-end, and wanna learn just the basics to learn how to deal with APIs.

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

    👌👌👌👏👏👏👏🙏🙏🙏🙏🖖🖖🖖🖖🖖

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

    why use lodash

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

      install loadsh with this command:
      npm install lodash --save

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

      @Mark Teena opps my bad, im not into Node JS like that. I didn't use loadash cuz it forgot to install it with the --save tag. so it was not working for me until I installed it with the "--save" tag. I assumed he was asking why brother with it since he does not tell use how to install it correctly in the tutorial and removing it doesn't effect the API if your using you own custom code. using loadash is tangential to the goal of this tutorial.