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
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.
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...
Thank you. I am trying to build an api atm, this video came out right on time.
Love your Tutorial, hope more video about Express and Node JS , especially how to secure API and login with JWT
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.
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.
Great Video.
Explained really well.
Thank you!
Thank you, ur explanation is very clearly and to the point
Excellent Tutorial, Thank You Very Much
Great video mate !
thank you a million)) helped me a lot
I'd like to see another video like this one.
Thanks brother for this informative video :)
Thanks a lot for the video...
great explanation keep it up
very helpful thank you too much
well done!
Excellent tutorial. I had to use Postman instead of Insomnia because my computer is old OS 10.11 (El Capitan).
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;"
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.
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
I'd love to see database and JWT implementation
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.
Can i use that for my small ecommerce project? Login system, user records etc?
Do the endpoints persist if I want to keep any processes running between API requests or do they die like serverless functions?
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??
Do you have time to make a video for oauth too?
Great tutorials man... Keep it up!!! The git link for this tutorial is not working.
Hey, try the GitHub link now - should be working!
simple api CRUD
in-memmory db
what use of express?
how about if i want to block others from using my api?
Make condition for special key as example
the github link is not working
Thanks. Will fix it shortly
dom i think the repository is private
Hey should be OK now
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.
👌👌👌👏👏👏👏🙏🙏🙏🙏🖖🖖🖖🖖🖖
why use lodash
install loadsh with this command:
npm install lodash --save
@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.