Build A Restful Api With Node.js Express & MongoDB | Rest Api Tutorial

  Рет қаралды 1,003,132

developedbyed

developedbyed

5 жыл бұрын

Check out my courses and become more creative!
developedbyed.com/
❤Become a patreon for exclusive videos and more!
/ dev_ed
Microphones I Use
Audio-Technica AT2020 - geni.us/Re78 (Amazon)
Deity V-Mic D3 Pro - geni.us/y0HjQbz (Amazon)
BEHRINGER Audio Interface - geni.us/AcbCpd9 (Amazon)
Camera Gear
Fujifilm X-T3 - geni.us/7IM1 (Amazon)
Fujinon XF18-55mmF2.8-4 - geni.us/sztaN (Amazon)
PC Specs
Kingston SQ500S37/480G 480GB - geni.us/s7HWm (Amazon)
Gigabyte GeForce RTX 2070 - geni.us/uRw71gN (Amazon)
AMD Ryzen 7 2700X - geni.us/NaBSC (Amazon)
Corsair Vengeance LPX 16GB - geni.us/JDqK1KK (Amazon)
ASRock B450M PRO4 - geni.us/YAtI (Amazon)
DeepCool ATX Mid Tower - geni.us/U8xJY (Amazon)
Dell Ultrasharp U2718Q 27-Inch 4K - geni.us/kXHE (Amazon)
Dell Ultra Sharp LED-Lit Monitor 25 2k - geni.us/bilekX (Amazon)
Logitech G305 - geni.us/PIjyn (Amazon)
Logitech MX Keys Advanced - geni.us/YBsCVX0 (Amazon)
DISCLAIMERS:
I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to Amazon.com and affiliated sites.
Twitter: / deved94
Instagram: / developedbyed
Github: github.com/DevEdwin
We are going to cover how to create a restful api using node.js express and mongodb together with mongoose.
Rest apis help us decouple our backend code from our front end so we can use it across multiple application (mobile apps, web apps, etc).
We are going to learn how to build a simple blog post type api with all the useful methods(GET,POST,DELETE,PATCH).
We use Node.js as our backend language, express.js is going to help us create routes easier and middlewares and we use mongodb together with mongoose to create schemas and models that define how our data looks.
If you are a beginner with nodejs, express or mongodb I hope that this tutorial will give you a good idea of how these technologies work well together.
🎵 Music:
Outro:
LAKEY INSPIRED - Me 2 (Feat. Julian Avila)
Music By: / lakeyinspired
Intro:
Dj Quads
Track Name: "Every Morning"
Music By: Dj Quads @ / aka-dj-quads
Creative Commons - Attribution-ShareAlike 3.0 Unported- CC BY-SA 3.0
creativecommons.org/licenses/b...
#mongodb #nodejs #express.js

Пікірлер: 1 600
@samadabbas4628
@samadabbas4628 Жыл бұрын
For people visiting this tutorial recently, some important things to note: 1. MLAB is not in function anymore you have to use mongodb atlas. 2. the cluster by default will not allow write access so you have to set it up in settings. 3. At 44:00, remove function is deprecated so you have to use deleteOne function
@sirikamkanampati1112
@sirikamkanampati1112 Жыл бұрын
Can you tell where we have to change the access exactly?
@valerio9851
@valerio9851 11 ай бұрын
thank you so much! I was like wtf is going on? ahahahaha thanks a lot
@ngantukASMR
@ngantukASMR 4 ай бұрын
Also id recommend using express.json() as a middleware instead of using body parser, since its built in
@Shinoku911
@Shinoku911 5 жыл бұрын
Please don't stop with this tutorials!! Super awesome for beginners like me.
@BekBrace
@BekBrace 3 жыл бұрын
Good luck friend, although I do not think that this specific tutorial is for beginners because if you already know about these techs then you're not a beginner anymore :)
@iqrasuhail3516
@iqrasuhail3516 3 жыл бұрын
I’m a student studying CS at Ball State University, IN. I am not someone who would comment on a video on youtube because she likes it. This is legit the first time ONLY to tell you that nobody explains it better. All your videos, be it explaining hooks in React, cool animations or CSS, or this tutorial - they are all explained so well! Thank you for your content.
@codergeany5861
@codergeany5861 4 жыл бұрын
Finally found a developer with humor , nice tutorial man
@TechnicalStudio
@TechnicalStudio 4 жыл бұрын
I loved your teaching style 😍😍.. Keep it up.. It helps us a lot
@egesaglam9500
@egesaglam9500 3 жыл бұрын
@Nikolas Ryker i have another scammers thanks alot
@lemuelreyes1941
@lemuelreyes1941 4 жыл бұрын
Spent all day looking for someone to teach it in an understandable way, this ended my search. Thank you!
@abdullahakram4942
@abdullahakram4942 4 жыл бұрын
1 Year later still the best tutorial. Just started NodeJs and this covered mostly all the concepts i needed to build an API. Keep up the good work!!
@vaibhavherugu9862
@vaibhavherugu9862 4 жыл бұрын
I was building an API, and this taught me everything! Keep making videos about APIs! Thanks!
@Vt12365
@Vt12365 4 жыл бұрын
Thank you for making this, most tutorials I come across are difficult to understand or way too slow. Your pace and explanations for this tutorial is perfect. It is exactly what I was looking for.
@chrisgermann7414
@chrisgermann7414 4 жыл бұрын
Maaaannn you are my Hero! I struggled so long with all this stuff and finally I really really get it. Thx a lot for your tutorial! It was amazing :D
@danfoyuk
@danfoyuk 4 жыл бұрын
I put this on for 10 minutes of background noise while I made my morning coffee and ended up transfixed for the whole thing. Your style is incredibly engaging, I laughed out loud a bunch of times and I could listen to your accent all day. Thanks a lot!
@riskitall7421
@riskitall7421 2 жыл бұрын
You are literally my favorite teacher on KZfaq. You know how to dumb things down to let everyone understand it. Thank you Ed for making things simple!
@dragonballsuper1519
@dragonballsuper1519 4 жыл бұрын
You are a really good teacher. You don´t just code away but actually take your time to explain what´s happening with each line of code. It makes it so much easier to understand! Subbed.
@kaanuki3203
@kaanuki3203 5 жыл бұрын
Ive watched many Node, Express tutorials. This is, by far, the best one Ive seen. Thank you!
@blazi_0
@blazi_0 3 жыл бұрын
hi i hope u can help me why middlewares not working ? app.use not working for me
@mhonjesterjohncalingo8799
@mhonjesterjohncalingo8799 3 жыл бұрын
Your teaching style never gets me bored. If I can only Subscribe on your channel for a thousand times I'll do it. Keep it up and may you never runs out of energy doing this.
@user-iw3un8xg9e
@user-iw3un8xg9e 7 ай бұрын
entertaining, short, tips and tricks every thing in a single video, thanks devbyED.
@nox_machina
@nox_machina 4 жыл бұрын
Excellent walkthrough. Transitioning from Rails + React to Node + React here, somehow this feels way more natural than all the db:migrate commands I've had to type in.
@Sconner87
@Sconner87 5 жыл бұрын
Great tutorial, I'd love to see the front-end as a part two of this tutorial. Keep up the great work!
@prewishjay5581
@prewishjay5581 Жыл бұрын
ur a great teacher. ur energy too. usually i start getting sleepy at other tutorials but urs is great
@Corumt
@Corumt Жыл бұрын
You just got yourself a new subscriber and a fan thanks for this, I've been struggling with this for months..
@guido2333
@guido2333 5 жыл бұрын
This is awesome! well explained, easy to understand and great tempo!
@developedbyed
@developedbyed 5 жыл бұрын
Magic!
@daniyelme9535
@daniyelme9535 4 жыл бұрын
Hi Ed, what happened to your Github account? Thanks for the great content!
@whiteblackbox
@whiteblackbox 3 жыл бұрын
i finally knew your trick after slow it down on 0.25 speed :)
@santoshpasupunuri
@santoshpasupunuri 4 жыл бұрын
No beating around the bush. Straight to the point. Loved it!
@user-rd3jw7pv7i
@user-rd3jw7pv7i 2 жыл бұрын
SIR This has got to be the most clear, concise and well made programming tutorial that I have EVER seen. Please keep making videos in this format. I can't express in words how helpful this video is for me. THANK YOU
@11am
@11am 5 жыл бұрын
I really love people that teach code with character, it's so much engaging than being stiff and plain, thank you! Also you can use Yarn instead of npm haha
@acuraintdohc
@acuraintdohc 5 жыл бұрын
"You want a magic trick? I got you!!" Love it 😀
@aghoghouwejeyan5701
@aghoghouwejeyan5701 2 жыл бұрын
Hi, just ran into this tutorial and you really nailed it. You made it so clear for me to understand. You're a good teacher. I had to quickly subscribe even before finishing the course. Thank you.
@TheReventh
@TheReventh 4 жыл бұрын
This is the best explanation I could get from someone. Thanks a lot Ed for this and keep making more.
@ezeamaka
@ezeamaka 5 жыл бұрын
Awesome tutorial here, been looking for this RESTAPI with async await, it just came at the right time. I would like to see you go in depth with user auth and bcrypt. You just saved a soul
@blazi_0
@blazi_0 3 жыл бұрын
hi why middlewares not working ? app.use not working for me
@dean6046
@dean6046 4 жыл бұрын
First time viewer here. Love the energy, passion and light hearted humor. Keep up the good work! I believe I got here from Brad Traversy recommending your channel.
@json9353
@json9353 3 жыл бұрын
Best tutorial I have seen on youtube. Had forgot a lot about express and you helped me out. You got a new sub, thank you sir!
@anonymously94
@anonymously94 4 жыл бұрын
Great tutorial, helped me solve all my problems I ran into in my project. You're amazing Dev Ed!
@SabrinaWolf
@SabrinaWolf 4 жыл бұрын
This is an awesome tutorial, THANK YOU
@pixelove1100
@pixelove1100 4 жыл бұрын
Dude, you're saving my life. Explained that even I understood whole flow and what each line of code is doing. You definetely should compete for a Nobel Prize or something. Thanks mate!
@RidhoAhmad
@RidhoAhmad 4 жыл бұрын
This tutorial is better than other plenty of hours of videos i've watched... Thanks for making this !!
@abdellaouiibrahim8365
@abdellaouiibrahim8365 4 жыл бұрын
I love this man for the way he explains stuff. Bless your heart :D
@AlejandroLZuvic
@AlejandroLZuvic 3 жыл бұрын
"Good job package.json, you're doing your job!" I spat my coffee laughing LOL
@noeljose
@noeljose 3 жыл бұрын
Honestly, I spend 53 minutes and 54 seconds of my life learning something useful. Thank you, Ed. You will have a good love life.
@dankrahul3038
@dankrahul3038 Жыл бұрын
😂 you nailed it
@kevinsana8442
@kevinsana8442 4 жыл бұрын
I am taking my first steps into junior development. I was tasked by my mentor to create an API with only 1 Route. He asked for just a 2 tier database architecture as 3 might have been difficult for me to comprehend. After a few hours of searching the internet, I stumbled across this video among other older videos. This was the only tutorial that fundamentally taught me everything i needed to know and more. Thank you so much for your help! I cannot wait see what else I can learn in programming :)
@hamdi9624
@hamdi9624 2 жыл бұрын
Your love life is great cause you are giving alot of informations to people and they actually love you and your style. Keep it up man!
@videosworthwatching8507
@videosworthwatching8507 5 жыл бұрын
Awesome and thank you...We will love to see you do a series on CRUD app in MERN stack .
@developedbyed
@developedbyed 5 жыл бұрын
Finally 1080p jesus...
@thanveershah4758
@thanveershah4758 5 жыл бұрын
@Jack Rong Nop , I don't think we need that
@kelvinmunene4750
@kelvinmunene4750 5 жыл бұрын
Nice videos. Kindly, do a video on MERN
@Oshchenkov
@Oshchenkov 4 жыл бұрын
When you init npm add flag -y for standart settings ( npm init -y )
@arif.wijianto
@arif.wijianto 4 жыл бұрын
awesome thanks you ed
@razx2009
@razx2009 4 жыл бұрын
Just a quick question can we read data from already existing collection in mongo without creating schema?
@petrhanzl8399
@petrhanzl8399 3 жыл бұрын
this one hour video summarize three lectures that are 2h long on my collage. Appriciate your work dude! Thank you
@arascillidag2833
@arascillidag2833 3 жыл бұрын
Your energy was super high & explanation was so clear. Thanks a lot ;)
@christian15213
@christian15213 4 жыл бұрын
YOOOOO lol you made me laugh so hard when you were like "I don't know why you would have a price." The way you gave attention to that was just awesome. "let me get rid of that." OMG laughing so hard.
@TheAssasinsBreed
@TheAssasinsBreed 4 жыл бұрын
thanks for the great fundamental tutorial Dev Ed. Hope everything goes right for your love life. If it doesn't go left :)
@kasahunwelela2787
@kasahunwelela2787 8 ай бұрын
your tutorial is the best I've found, and I want to express my heartfelt thanks for your excellent teaching.
@KarlgustaAnnoh
@KarlgustaAnnoh 2 жыл бұрын
Thanks Edwin. I really enjoyed. Haha. I really cracked my ribs out at the end. Learning why laughing too. Great work!
@FredricCliver
@FredricCliver 4 жыл бұрын
Don’t be emotional 😂 Thank you for this good tutorial!
@janakaedirisinghe9549
@janakaedirisinghe9549 5 жыл бұрын
Love your videos btw. Keep it up from srilanka
@artythamaiithin9496
@artythamaiithin9496 5 жыл бұрын
Love from SL
@esaukakuru7380
@esaukakuru7380 3 жыл бұрын
Dev, u just made my undderstanding of rest API much easier, just 15 min into your vid and am loving your presentation. thank you sooooo much...
@chrollochrono
@chrollochrono 3 жыл бұрын
You're so awesome! I never imagined that I can quickly understand the CRUD in RESTful API until I saw your video. Thank you so much!
@aryankatebain
@aryankatebain 5 жыл бұрын
You are the best teacher in the world 🌍
@ilan117
@ilan117 5 жыл бұрын
Hi Ed. Thanks, really amazing as all of your videos tutorial but honestly I missed the previous videos with the web design, web animations and new techniques you have been teaching us so I hope this is not starting to be only hard core programming channel e.g react and nodejs. I think you are amazing anyway ...
@developedbyed
@developedbyed 5 жыл бұрын
Nope...will cover design 3d and other things too 😀
@mohammadghandour4756
@mohammadghandour4756 2 жыл бұрын
The fact that I subscribed just after watching your intro ?? Bruhhhh... Love your energy
@TraxPSN
@TraxPSN 3 жыл бұрын
thanks alot Ed this was a ton of useful information in just one video
@huangehe8306
@huangehe8306 5 жыл бұрын
I think that it will be cool if U make tutorial for authorization (registration, login) app with some other features (for example,using React for front), and show how to integrate that with backend. Thank u for great explaining.
@janzmarfz373
@janzmarfz373 4 жыл бұрын
up for this or btw angularjs
@SivaNare
@SivaNare 3 жыл бұрын
guys can some one share working code please (github) devE's link for github in description doesent exist i am having issue writing data to database but i am not getting any errors couldn't figure out trying very hard
@ege2026
@ege2026 2 жыл бұрын
@@SivaNare did you find it? i post data from postman but it gives an empty error message while it's not responding the data back.
@GTX-cr4ob
@GTX-cr4ob 2 жыл бұрын
@@ege2026 i can help
@nirav10011101
@nirav10011101 5 жыл бұрын
This one is cool tutorial. To the point. Btw, mlab has been acquired by Mongo atlas. So, everything has been changed
@maniiakas
@maniiakas 4 жыл бұрын
Not really, Mongo atlas is almost identical and it is very easy to go along with the tutorial
@SharinganCrypto
@SharinganCrypto Жыл бұрын
thanks for this! much appreciated I learned several new concepts I hadn't seen before: the dotenv (which is extremely useful) for example...the dependency to get around the CORS policy error...all very informative.
@swiftMyDay
@swiftMyDay 4 жыл бұрын
This is the most productive video I’ve seen in KZfaq in my entire life
@pockit_fluff
@pockit_fluff 4 жыл бұрын
For people having trouble around the 33:00 minute mark when trying to commit a post via Postman I suggest checking your name and password is correct on your mongoDB link.
@kiranmahajan778
@kiranmahajan778 4 жыл бұрын
Its totally correct but still not working
@joseheliojunior242
@joseheliojunior242 3 жыл бұрын
U are right man. It´s a big confusing, but I got it Thanks.
@robertoradu9965
@robertoradu9965 3 жыл бұрын
@@kiranmahajan778 Have you solved ? Commit (save method) is not working and no error message is displayed!
@robertoradu9965
@robertoradu9965 3 жыл бұрын
here the solution: check if your ip changed, update your whitelist in the mlab, then it should work
@kiranmahajan778
@kiranmahajan778 3 жыл бұрын
@@robertoradu9965 okay i will try!
@liers2563
@liers2563 4 жыл бұрын
Hi, I'm having problem with postman. Its returning me "could not get any response" when posting "my first post" but prior to that it is showing in the terminal. What could be wrong?
@surajitsil1996
@surajitsil1996 4 жыл бұрын
I'm having it too, did you solved it? then kindly tell me the solution.
@kristboshnjaku135
@kristboshnjaku135 3 жыл бұрын
did you manage to find the solution to this? im having the same issue.. :(
@jazilzaim
@jazilzaim 4 жыл бұрын
Was watching this during quarantine to learn backend a bit more! You have done such a fabulous job! Thanks for simplifying all of this! You are amazing Ed! Keep doing great work! Love your content!
@prateekmitra9702
@prateekmitra9702 3 жыл бұрын
Great tutorial. I always wondered what was cors, and you cleared it up for me. Thanks a lot, DevEd!!
@ectoplasm1285
@ectoplasm1285 5 жыл бұрын
hey, mlab site says this - "mLab is no longer accepting new customers. Sign up below for MongoDB Atlas, a fully managed database-as-a-service." i've registered, but i can't login on mlab site since it asks for my username, and when i provide my email as an username, i get an error stating that username or password are wrong. the only thing i can log in is that mongodb atlas and i have no idea what it is. however, there is no chance to get to that point where you are creating database. do you (or someone else) might know what's it all about ? thanks in advance!
@iam.devangmp
@iam.devangmp 3 жыл бұрын
I'm facing same issue with mlab I'm unable to sign-in with the credentials of the mongodb atlas. How to get proceed with mlab with MongoDB Atlas Credentials.
@tiagooliveira9196
@tiagooliveira9196 5 жыл бұрын
Hey Ed, are you pretending to create a frontend tutorial to interact with this REST API ?
@codewithtoyin
@codewithtoyin 2 жыл бұрын
Now you're my favourite KZfaqr 😍 a whole month of my life in less than and hour
@lukasluftlaufer1093
@lukasluftlaufer1093 2 жыл бұрын
Slowly backend stuff gets demystified thanks to your amazing tutorials! 💛
@Hari2897
@Hari2897 4 жыл бұрын
I'm following along the tutorial but Postman is stuck at "Sending" @ 34:12 It prints console log message but nothing with mongoDB... I see nothing nothing updated in MongoDB atlas too. Please reply as to what could the solution to the problem be?
@mdhishaamakhtar2040
@mdhishaamakhtar2040 4 жыл бұрын
Same
@n_arin
@n_arin 4 жыл бұрын
Check your DB connection string
@ChrisPChickennn
@ChrisPChickennn 4 жыл бұрын
same problem. I tried retrieving the connection string again, no luck. seems to be a problem with the promise, or postman not working with the db. my postman console log shows Error: socket hang up on the post requests im sending after they fail - looked online for context/resolution, not much help.. only thing i could find that might help is about making sure the proxy is configured correctly. thats outside my wheelhouse, i just made sure to turn off any proxy in postman via settings>proxy, still no luck.
@chinkx1998
@chinkx1998 4 жыл бұрын
Hi. I am facing the same issue. Do u guys able to find a solution?
@walljacket
@walljacket 4 жыл бұрын
I had the same issue. It took me hours to catch the issue.. I spelled mongoose with a capitial "M" as in const mongoose = require('Mongoose') thus all of my db operations timed out.
@developerjusta6673
@developerjusta6673 5 жыл бұрын
Please make a full tutorial building a chat app with React and Firebase! :) It would be really helpful!
@ThisuriAbeywardana
@ThisuriAbeywardana Жыл бұрын
You are great. The way you are teaching is awesome. This is the first time I watched a whole tutorial video. Thank you for teaching all these in a simple way!
@bettinimarcelo
@bettinimarcelo 2 жыл бұрын
Just created my first API with this tutorial. And, most important, not just copied your code but understood every step. Lott'a loving from Argentina man.
@jaydesai1430
@jaydesai1430 3 жыл бұрын
Hey I'm getting error on the time interval of 33:47 to 35:54 were there is new (first) data generate for the mongoose with post. For me its just going into the ".catch" instead of the ".then"
@kristboshnjaku135
@kristboshnjaku135 3 жыл бұрын
did you manage to find the solution to this? im having the same issue.. :(
@jaydesai1430
@jaydesai1430 3 жыл бұрын
@@kristboshnjaku135 try { const savedPosted = await post.save(); res.json(savedPosted); }catch(err) { res.json({ message: err }); }
@jaydesai1430
@jaydesai1430 3 жыл бұрын
@@kristboshnjaku135 Try this out and also one more thing make sure you have your ip address connected to the altas mongo db because when you run on localhost it won't with just db user and password you will need to config the ip address.
@jaydesai1430
@jaydesai1430 3 жыл бұрын
@@kristboshnjaku135 These 2 thing resolved my issue.
@LIFE-nr1yg
@LIFE-nr1yg 2 жыл бұрын
@@jaydesai1430 hi Jay, sorry to say but this didn't help; still catching the error not the post itself in Postman.
@santiagowhite5467
@santiagowhite5467 3 жыл бұрын
When I post, the json file comes only with message={} , and it doesnt post anything to mongodb atlas. Help
@kristboshnjaku135
@kristboshnjaku135 3 жыл бұрын
did you manage to find the solution to this? im having the same issue.. :(
@santiagowhite5467
@santiagowhite5467 3 жыл бұрын
@@kristboshnjaku135 I manage to fix it: const express = require('express'); const router = express.Router(); const Film = require('../models/Film'); router.get('/', (req, res) => { console.log("We are on films GET"); res.send('We are on films GET'); }); router.post('/', (req,res) => { console.log("We are on films POST"); console.log(req.body); res.send('We are on films POST'); }); module.exports = router; just edit films to whatever u want
@kristboshnjaku135
@kristboshnjaku135 3 жыл бұрын
@@santiagowhite5467 You managed to run the code and get the console.log work, but did you actually manage to insert your data to the db? that's the problem here...
@santiagowhite5467
@santiagowhite5467 3 жыл бұрын
@@kristboshnjaku135 I did, I suggest you watch a more recent video by Dev Ed in which he uses mongodb atlas, where he takes all steps necessary to ensure connectivity with db. The name of the video is “build a nodejs api authentication (...)”. He builds a rest api aswell.
@kristboshnjaku135
@kristboshnjaku135 3 жыл бұрын
@@santiagowhite5467 Ok, I'll give it a try... I'm still confused why it's just catching the error instead of the data first :p At least I can get it working.. Much appreciated bud!
@fregina3813
@fregina3813 2 жыл бұрын
you look sooooooo happy, and it really makes student like me feel relaxed.
@shubhammukherjee6845
@shubhammukherjee6845 4 жыл бұрын
Hey man, I need help. I am totally new to Express+Mongo, I have done exactly what you have showed. Its getting connected to database too. But when I am trying to post(save) data to database, its not showing any result( res.json(data) is not coming up in postman). What I think is happening is I have not mentioned the collection name. Do we need to specify the collection name too in Schema. if yes, could you please provide me with full details. Thanks in advance
@chanellesesh4977
@chanellesesh4977 4 жыл бұрын
Did you manage to fix this??
@shubhammukherjee6845
@shubhammukherjee6845 4 жыл бұрын
@@chanellesesh4977 yes. We need to pass the collection name as a parameter if the collection is already created in the database. In my case, I wanted to use one of the collection already provided in Mongo Db Atlas. So I just pass the name of the collection as a parameter in the Schema. That's it.
@shubhammukherjee6845
@shubhammukherjee6845 4 жыл бұрын
@ yeah sure const GradesSchema = mongoose.Schema({ recrd : { type : String }, vesslterms : { type : String }, feature_type :{ type : String }, chart :{ type : String }, latdec :{ type : Number }, londec :{ type : Number }, gp_quality :{ type : String }, depth :{ type : String }, sounding_type :{ type : String }, history :{ type : String }, quasou : { type : String }, watlev: { type : String } }, {collection : 'shipwrecks'}); The 'shipwrecks' being the collection name.
@shubhammukherjee6845
@shubhammukherjee6845 4 жыл бұрын
@ are you giving the right database name in the connection url? Change the 'test' part with your database name in the connection url
@StephenSimon
@StephenSimon 3 жыл бұрын
{ useNewUrlParser: true, useUnifiedTopology: true }, add this to your app.js file inside mongoose.connect
@jasonennis4905
@jasonennis4905 5 жыл бұрын
Let me guess the one dislike on this video is a PHP developer.
@peefg
@peefg 4 жыл бұрын
😕 I don't think so.. I am PHP developer, but I have always wanted to start with something like this. This guy is a hero for me. I have immediately subscribed and liked this video. I wish he had zero dislikes.
@ajricherson1099
@ajricherson1099 4 жыл бұрын
Php devs don't love themselves
@RadosBudisa
@RadosBudisa 4 жыл бұрын
@@ajricherson1099 We don't love our selfs but we are selfless!
@oyoyoyoyoyoy9479
@oyoyoyoyoyoy9479 4 жыл бұрын
@@peefg no, probably thats Java guys
@__sagar_shah__591
@__sagar_shah__591 4 жыл бұрын
wow that's not sarcastic at all!!!!
@rick_from_yr
@rick_from_yr 3 жыл бұрын
You're the best teacher for NodeJS REST API on KZfaq :D thanks a lot
@odn7769
@odn7769 3 жыл бұрын
Thanks! I tried different tutorials and yours where super easy and fun to watch and you explain great! I understand now a lot of things I use everyday at work and finally are able to build this stuff from zero myself. Its so easy!
@daniellaerachannel
@daniellaerachannel 5 жыл бұрын
use mongodb atlas instead of mlab, cause is has been acquired, great tutorial
@kenyadorcelus917
@kenyadorcelus917 5 жыл бұрын
By MongoDB
@GaurangDhorda
@GaurangDhorda 5 жыл бұрын
Mlab is Now part of the MongoDB family... so atlas too :)
@sahelee1
@sahelee1 4 жыл бұрын
can anyone tell me how to do that??
@aozdesigns6675
@aozdesigns6675 3 жыл бұрын
@@sahelee1 did you know how to do that?
@Scapben
@Scapben 3 жыл бұрын
somehow this syntax at 29:13 worked for Ed but not for me... router.post("/", (req, res) => { console.log(req.body); }); ...when sending a POST request with Postman, I could not get any response SOLUTION: router.post("/", (req, res) => { res.send(console.log(req.body)); }); INSTEAD OF router.post("/", (req, res) => { console.log(req.body); }); I have no idea what I'm doing but this worked for me !
@kristboshnjaku135
@kristboshnjaku135 3 жыл бұрын
did you manage to find the solution to this? im having the same issue.. :(
@ayeshashabbir2097
@ayeshashabbir2097 3 жыл бұрын
facing same issue.. i am just getting: { "message": {} }
@Scapben
@Scapben 3 жыл бұрын
​ @Krist Boshnjaku and @Ayesha Shabbir Did you try res.send(console.log(req.body)); INSTEAD OF console.log(req.body); ? That worked for me three months ago.
@ayeshashabbir2097
@ayeshashabbir2097 3 жыл бұрын
Yes I tried res.send at first but it didn't work ..so just for checking I changed it to console.log to see whats happening.
@ayeshashabbir2097
@ayeshashabbir2097 3 жыл бұрын
@@Scapben i'll check it again!!
@usmanali-fe3gd
@usmanali-fe3gd 4 жыл бұрын
it's just great. i learned entire node js structure in one tutorial. i'm a dot net developer and was looking for similar to the point content. great content
@pengsi3578
@pengsi3578 2 жыл бұрын
Your tutorial saved my life! So grateful, Dev Ed!
@mblakew1273
@mblakew1273 4 жыл бұрын
Love this tutorial, but also “authentificated” is not a word 😂
@samuellucas7049
@samuellucas7049 4 жыл бұрын
😂
@yayz_
@yayz_ 3 жыл бұрын
10:40 "It says to connect use driver blah blah blah blah here" ... This is pretty much how I read documentation..
@moafeenns
@moafeenns 2 жыл бұрын
I love this guy & his content. He's good at explaining everything and he makes them look like a piece of cake when it's actually the opposite.
@nitinjena535
@nitinjena535 2 жыл бұрын
man, I was searching CRUD and everyone making tons of file structure & MVC style, I knew Express has a patch method but no one really used that ...Thanks man
@robbiekruszynski4043
@robbiekruszynski4043 4 жыл бұрын
I'm following all the way up until 34:00(ish) for some reason when in postman I can't see the object created with the id, title, desc, etc"
@mattbra1397
@mattbra1397 4 жыл бұрын
You need to put const bodyParser = require('body-parser'); ABOVE const app = express(); and it should work - took me 2h to figure it out and it's not in the vid
@BodrumDrone
@BodrumDrone 4 жыл бұрын
@@mattbra1397 in postman use x-www-form-urlencoded mode dont use raw its work it to me
@mattbra1397
@mattbra1397 4 жыл бұрын
@@BodrumDrone thanks for the info - we got now two solutions to the issue :)
@BodrumDrone
@BodrumDrone 4 жыл бұрын
@@mattbra1397 i follow all information about solution.
@LIFE-nr1yg
@LIFE-nr1yg 2 жыл бұрын
i get postman to console the first post but when i try to get it in postman it gives me only the error part. i tried with x-www-form-urlencoded, same thing. looked online for other solutions, nothing worked
@therealagent4764
@therealagent4764 5 жыл бұрын
7:52 Authentification?
@tudoresan3031
@tudoresan3031 3 жыл бұрын
Loved it! Keep doing it! Thank you very much!
@sparrowekk8688
@sparrowekk8688 2 жыл бұрын
Thanks Dev for your tutorial. You helped me a lot with this stuff.
@JohirulIslam-lm2vz
@JohirulIslam-lm2vz 3 жыл бұрын
Great & Excellent ... I have been looking this type of videos around KZfaq ... I like your teaching style.
@The.SpiritualScientist
@The.SpiritualScientist 2 жыл бұрын
I was doing an online course on node js and would always freak out when it comes to connecting with Mongo db. Literraly stopped continuing on that paid course to return to KZfaq and learn it so well from this video. No wonders, you are a great teacher and have bright future. My best wishes and blessings for a great love life as well. Keep up the great work with the same passion and you will see miracles happening in your life. Thanks again. God bless you.
@mikealejandro3938
@mikealejandro3938 3 жыл бұрын
Ed, i love you, this is helping so much that you can't imagine homie !!
@mddawoodrazauddin8841
@mddawoodrazauddin8841 3 жыл бұрын
Thanks a lot! So many things covered in just a single video!
@AbdulmonaemAlbaqlawi
@AbdulmonaemAlbaqlawi 3 жыл бұрын
Brilliant and creative, Ed. I like it. I purchased your combo course bundle for that ;)
@Ezamar
@Ezamar 2 жыл бұрын
My first time commenting on a tutorial video coz this was the most entertaining and fun I've watched. Keep up the great tutorials! :D
@bakercsgo5822
@bakercsgo5822 Жыл бұрын
just another comment saying how good of a teacher you are... making me laugh while im learning is going to keep my attention longer and you are a part comedian too. thanks so much for your service!
@mohamedshuaau632
@mohamedshuaau632 3 жыл бұрын
Opened the video and instant thumbs up. You are my fav
@glorysinkhonde197
@glorysinkhonde197 Жыл бұрын
You literally make the best tutorials on KZfaq
How to build a REST API with Node js & Express
58:40
Programming with Mosh
Рет қаралды 1,7 МЛН
Build A Node.js API Authentication With JWT Tutorial
1:15:41
developedbyed
Рет қаралды 732 М.
THE POLICE TAKES ME! feat @PANDAGIRLOFFICIAL #shorts
00:31
PANDA BOI
Рет қаралды 24 МЛН
ОСКАР vs БАДАБУМЧИК БОЙ!  УВЕЗЛИ на СКОРОЙ!
13:45
Бадабумчик
Рет қаралды 4,6 МЛН
REST API Crash Course - Introduction + Full Python API Tutorial
51:57
Mongoose Crash Course - Beginner Through Advanced
33:36
Web Dev Simplified
Рет қаралды 451 М.
Build A Restful Api With Node.js Express & MongoDB | Rest Api Tutorial
1:15:57
Smooth Page Transitions With Javascript Tutorial
33:41
developedbyed
Рет қаралды 867 М.
Build a REST API with Node.js, Express, TypeScript, MongoDB & Zod
2:09:19
Nike App Backend: node.js, MongoDB, Redux Toolkit Query
3:18:03
notJust․dev
Рет қаралды 31 М.
CRUD REST API using Node | Express | MongoDB
52:35
Telusko
Рет қаралды 373 М.
APIs for Beginners - How to use an API (Full Course / Tutorial)
2:19:33
freeCodeCamp.org
Рет қаралды 4,3 МЛН
Node.js Tutorial For Beginners | Node JS Crash Course
41:44
developedbyed
Рет қаралды 101 М.
Vanilla Node.js REST API | No Framework
1:01:37
Traversy Media
Рет қаралды 161 М.
Самый дорогой кабель Apple
0:37
Romancev768
Рет қаралды 332 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН
OZON РАЗБИЛИ 3 КОМПЬЮТЕРА
0:57
Кинг Комп Shorts
Рет қаралды 1,5 МЛН
НЕ ПОКУПАЙ СМАРТФОН, ПОКА НЕ УЗНАЕШЬ ЭТО! Не ошибись с выбором…
15:23