MongoDB Basics, CRUD and Node.js Integration

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

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

  • @andrewrico8321
    @andrewrico8321 4 ปีที่แล้ว +10

    Broo... You are the BEST Instructor EVER!!!!!

  • @Goorxun-yeer
    @Goorxun-yeer ปีที่แล้ว +1

    I taught over 25 years in schools and colleges. Brad is really great teacher. Comprehensive knowledge, very clear and straight to the point. Could you please include ( MERN Stack: MongoDB, Express, React & Node.js Full Project) in Udemy Brad? Thanks.

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

    I discovered something interesting that you need to know and explore further, perhaps.
    I'm Brazilian, I'm 70 years old, my English isn't very good and I still have some hearing difficulties. And it's not because of my age!
    Your speech, diction and the pauses between words make the Google translator perfectly translate from English to Portuguese.
    It's like reading a book edited in Portuguese.
    Incredible!!
    my name is Jorge

  • @montukun42
    @montukun42 4 ปีที่แล้ว +17

    The best instructor i've ever found on youtube. Btw, waiting for Firebase ❤️

  • @joel-rg8xm
    @joel-rg8xm 3 ปีที่แล้ว +8

    Awesome!
    Just a remark: I edited this line of code due to Connection Error: (added .MongoClient at the end)
    const mongodb = require('mongodb').MongoClient

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

      Thank you, i really appreciate this.. i got stuck in that part too.

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

      Thank you Joel... I got stuck here and wasted at least an hour

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

    Came here from the JS course.... the MongoDB setup is outdated, there are now many more options we're presented with not covered in any of your course material or web series. For a first time user of Mongo, this is creating some concern...
    Figured most of it out, and the one thing I had to go to SO for, this was the thing:
    mongodb.connect is no longer a valid function as it stands. You must use MongoClient. The easiest way to fix this is to use this with the declaration: const mongodb = require("mongodb").MongoClient. Simply adding that period and MongoClient at the end seems to have fixed it. There are other ways to go about this, but that is by far the simplest fix.
    Thank you for all your courses, you're the only teacher I've found in coding that is ACTUALLY teaching and not just telling people to watch them code and learn by some sort of magical telepathy that doesn't exist. Like asking a med student to learn how to perform a heart transplant by only watching one and following along with no practical knowledge or experience... would you trust that person to perform surgery on you!?

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

      I had this problem as well and it is fixed now, but another error pops up saying for line 6 "const db = client.db()". The error says "TypeError: Cannot read properties of undefined (reading 'db')". Anyone know how to fix this?

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

      @@Gibdo_ facing same error

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

      @@Gibdo_ Can't find this in my code... might sound silly, but if I remember correctly, it may solve it simply by changing 'const' to 'let.' It's possible the db variable needs to be reassigned later on.

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

    Very impressive teaching style, clear, consistent, precise, almost mesmerising !
    Would be great to see a lesson on relational database (MySQL), as a beginner, I am, like many learners, still not clear when to choose which type of database, eg. when building a ecommerce website that requires Multi tiers filtering function.

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

    The best place to learn ... very good content... your voice is very clear ..

  • @mwaqaspro
    @mwaqaspro 4 ปีที่แล้ว +5

    Best ever instructor! Love you, sir!

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

    You're the best instructor anyone can ever have.

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

    Great series! You cover a lot here and in your udemy course (and I’m a student in 3 of them), but what you’re missing is email integration. I basically have everything I need to create a mini SaaS, but connecting it with a custom domain, and having my netlify app email user notifications and updates from @domain would be really helpful.
    Hope you’ll make a video on that one day soon :-)

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

    A great tutorial on performing CRUD operations on a Mongo Database. Thanks, Brad
    {2021-11-29}

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

    You are an amazing teacher, your explanations are short and sweet which really helps me understand the concept even better!

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

    Clear and straight to the point, great tutorial, I've subscribed!

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

    please make more such videos really helpful. start making some mini projects with MERN stack

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

    I noticed the Dental braces. Hope your are Okay. 🤔
    Half way through this video. Already learned a lot. 👏
    Thanks for the quality content. 💚

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

      😂 the braces finally get to come off pretty soon here! Thanks for the support 💚

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

    Really excellent video tutorial.

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

    Your tutorials are the TRUE zero to hero.. Thanks You!! Also waiting for firebase

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

    If you ever thought you were not clever enough to study a subject, just ask Brad to teach it. Can you move into nuclear physics?

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

    Love From Bangladesh Sir

  • @aeterna_victrix
    @aeterna_victrix 3 ปีที่แล้ว +4

    Regarding the 'mongodb.connect is not a function' error. You will need to add ".MongoClient" to your mongodb variable like so..... const mongodb = require("mongodb").MongoClient;

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

      Thanks

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

      Thank you very much!!

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

    Great tutorial! Thank you!!!

  • @md.farukuzzaman3911
    @md.farukuzzaman3911 3 ปีที่แล้ว +2

    hey, there is an error message, it says ''' mongodb.connect is not a function

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

    Please we need in-depth tutorial on firebase!
    Also, will we create a big project at the end of this bootcamp series, using all the knowledge we've learnt (and will learn) together just like the real world?.

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

      If you still can't find a good tutorial on Firebase, search Shaun Pelling's YT channel.

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

      @@TH-cam_IS_WOKE I know firebase, but I need in depth tutorial. An advanced guide sort of. I hv already watched all videos of Ninja on firebase. They are very basic, and doesn’t teach real world project.

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

      @@whoman7930 Do medium to big companies use Firebase? What sort of real-world application, do you use it in your company?

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

      @@TH-cam_IS_WOKE nah, Im still learning, I want to use firebase in my project. But I can’t visualize all the different firebase products working together in most efficient way. That what I’m lacking.

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

    at the newer version you cant use let mongodb = require("mongodb").MongoClient
    in order to make the connect يا براد يا غالي يا فلاح

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

    Please make a video on how to use any API documentation for beginners

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

    Is the next video coming up tomorrow?

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

    Brad offers wonderful instruction. However, in the MongoDB/CRUD video, I get this error: TypeError: mongodb.connect is not a function
    at Object. (C:\Users\David McMurrey\Desktop\mongodb-node-test\index.js:6:9)
    I added .MongoClient as indicated by joel-rg below. Now it just hangs.
    -- david

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

    yeeeah!! New bootcamp episode!!

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

    waiting for user auth video :)

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

    I am here... thank you...

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

    Excellent video as usual Brad. I have already finished 2 of your udemy courses and I just purchased 2 more. Looking forward to them. I was wondering if you would consider putting together some PHP/SQL courses and/or a TH-cam series? I know they are not super modern and trendy now like React and MongoDB but do you think in the future you might publish courses related to those topics? Or even React/Angular/Vue ones? Thank you

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

      Hi, thanks so much! You're right, even if PHP/SQL aren't super trendy, if we look at job boards it's clear they're super in-demand which really is what's most important. Even though in the real world it makes sense to jump right into Laravel or WordPress I do think a PHP/SQL essentials course would be useful. I'd like to cover Vue at some point!

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

      @@LearnWebCode that sounds great. I have already finished the WP course. I will definitely keep an eye on the upcoming videos and courses 👍

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

    10/10

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

    Hello sir, im learning fullstack course from udemy . Your way of teaching is just immaculate for me to learn many things in java script. But during the process, i came across an error "typeerror: mongodb.connect is not a function " .
    I tried to fix it but still getting same error. Please help if im missing something here......

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

      I'm getting the same error...have you fixed it?

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

      I just found it in the comments. You have to modify this:
      const mongodb = require("mongodb").MongoClient;

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

    TypeError: mongodb.connect is not a function, Does anyone know the solution to this problem?

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

      I'm looking for the answer too. I created class with MongoClient though but now I'm stuck on MongoClient.ObjectId is not a constructor error.

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

    Eagerly waiting ❤️

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

    Thank you, Brad. It was a great introduction to MongoDB. I have already enrolled your React.js course and I am really happy. I consider purchasing also a NodeJs course and I think I have to pick your full-stack course? at this point, I wonder that which template are you using for front-end side? ejs, handlebars or pug? Thank you.

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

      Thanks! We use EJS for the server-side-rendered HTML in the Full-Stack Node.js course. We do also write front-end JS for several features, but we don't use a library like React or Vue, just plain JS.

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

      @@LearnWebCode I've actually been following along with the full-stack javascript course and I'm kinda stuck. In the course, you use: the db.collections().insertOne method to create a new document then you use res.json(info.ops[0]) to return the same document that was just inserted. It would seem that the insertOne() method doesn't work that way anymore. I was redirected to use mongoose to do what you did and I'm hoping I succeed. Any feedback would be highly appreciated.

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

    getting type error and i have folowed 100%. ("TypeError: mongodb.connect is not a function
    at Object. (C:\Users\User\Desktop\VS-Projects\TODO-APP\index.js:7:9)"
    can you help please.Thanks

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

    Ye ye ye whatever...now where's the cat?!! Only kidding.

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

    mongodb.ObjectId("therespectiveid")
    gave me an error as
    mongodb.ObjectId is not a function.
    to solve it, at the top I had to declare,
    const ObjectId = require("mongodb").ObjectId

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

    Brad you're my favourite instructor. Please react..

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

      Thanks! My reaction: 🙂

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

      @@LearnWebCode pretty sure he was asking for the react js series 😅😅

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

    Tried everything why is error.." TypeError: mongodb.ObjectId is not a function" ... when trying deleteOne function ?

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

      @Giovanni Adorno Thank you.

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

    You are the BEST!

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

    Is there a way to join two different collections in Mongodb?

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

      Yep! Well, it's not exactly the same as in a SQL system, but it's been useful for me, check this documentation page out: docs.mongodb.com/manual/reference/operator/aggregation/lookup/

  • @AlexNicholls.
    @AlexNicholls. 3 ปีที่แล้ว

    when you get data back from mongodb is that a string? if i console log "results" i get back an object looking response but when try to access one of the items, console log "results.name" for example i get undefined. basically im trying to find out how to access and use items from a mongodb object in node

    • @AlexNicholls.
      @AlexNicholls. 3 ปีที่แล้ว

      the answer incase anybody else is wondering is that it is an array of objects, "results[0].name" gives the result i was looking for. probably im the only idiot who took a couple hours to realise that

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

    mongodb.ObjectId gives me an error.
    To fix it I need to write ObjectId instead mongodb.ObjectId and in the beggining of the document to write
    const {ObjectId} = require("bson")

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

      thanks!

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

    Brad Due to the changes of mongodb V5 the code needs to be updated, it is sending errors. Thank you very much

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

      Hi, for a different project, just this morning I was testing MongoDB 5.0.1 via Docker and the traditional approaches I use in this video were working, although it was a slightly different project. Are the errors you were getting just related to opening the initial connection? Or on a certain action?

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

      @@LearnWebCode
      Brad Thank you again, I apologize, but I didn't realize that you answered so long ago. The anouncement you made in udemy course, Learn JavaScript: Full-Stack... on the mid of october "npm install mongodb@3.7.2" solved the isue perfect.

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

    I have been trying to update some fields of an API for two long weeks and still cannot do it. How to update data from a req.body please (I trying to update data from user or Postman but it returns Null not the updated data), Thank you very much in advance.

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

      Is it an API that you created, or an existing one with documentation? I don't think it's a technical / coding problem, instead maybe the API is expecting something that you're not passing along to it?

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

      @@LearnWebCode I created it. thank you. Maybe in the future you can do an express API example? it would me great unfortunately I looked up on google all APIs > crud are created with and done with Mongoose. not with mongodb node driver.

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

    u r

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

    in 2021 its saying db is undefined

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

    Not working version error still

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

      What does the error message say?

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

      @@LearnWebCode async function without a catch block or by rejecting a promise........

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

    34:30 How to use ObjectId on mongodb => { _id: mongodb.ObjectId("bbdb3b3bb4bb2bb2bb4bb4bbb") }

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

    weird....his voice sounds just like Bucky Roberts....thenewboston

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

      Haha, did you see he just posted to TH-cam last week for the first time in years? Pretty cool stuff 🥳

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

      @@LearnWebCode Yeah. I'm amazed by the the cryptocurrency stuffs he was talking about. He really got emotional while explaining his discovery of finding the efficiency algorithms for reducing the delay for transactions. Really exciting stuffs. 🔥

  • @GoogleUser-mx5oe
    @GoogleUser-mx5oe 3 ปีที่แล้ว +1

    I'm sorry man IDK about those comments, but I didn't like how you just skip some really useful things and how u stop at a useless topic and talk about it for about 2 or 3 minutes ...

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

    Hi Brad, why teach MongoDB/ NoSQL database when in most (99%) real world ( professional environments) you should know SQL and work with for example MySQL, PostgreSQL, MsSQL or Oracle Databases? for me this video, make no sense and waste of time because one thing is choose between PHP and NodeJS, a complete thing is about databases, that majority of the companies use a SQL Database. ;)

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

    Are folks still using node.

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

      Do you know of any better option?