MongoDB Basics, CRUD and Node.js Integration

Поделиться
HTML-код
  • Опубликовано: 23 авг 2024

Комментарии • 90

  • @andrewrico8321
    @andrewrico8321 3 года назад +9

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

  • @montukun42
    @montukun42 3 года назад +17

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

  • @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

  • @joel-rg8xm
    @joel-rg8xm 2 года назад +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.

  • @mwaqaspro
    @mwaqaspro 3 года назад +5

    Best ever instructor! Love you, sir!

  • @lailasatriasuhaimi5231
    @lailasatriasuhaimi5231 3 года назад

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

  • @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 :-)

  • @STUPIDYOUTUBE_HIDINGMSGS
    @STUPIDYOUTUBE_HIDINGMSGS 3 года назад

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

  • @codingwithkenny6492
    @codingwithkenny6492 3 года назад

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

  • @Pareshbpatel
    @Pareshbpatel 2 года назад

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

  • @amy6149
    @amy6149 3 года назад

    You're the best instructor anyone can ever have.

  • @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;

  • @zhasan66
    @zhasan66 3 года назад +1

    Really excellent video tutorial.

  • @MrBioneto
    @MrBioneto 3 года назад +1

    Great tutorial! Thank you!!!

  • @streamx2
    @streamx2 3 года назад +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?

  • @federicoraulmaciasaparicio1339
    @federicoraulmaciasaparicio1339 3 года назад

    yeeeah!! New bootcamp episode!!

  • @iank7340
    @iank7340 3 года назад

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

  • @Yeapes
    @Yeapes 3 года назад +1

    Love From Bangladesh Sir

  • @nikhil_squats
    @nikhil_squats 3 года назад

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

  • @techmathy5764
    @techmathy5764 3 года назад

    Eagerly waiting ❤️

  • @shahriarparvezshuvo4760
    @shahriarparvezshuvo4760 3 года назад

    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  3 года назад +2

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

  • @msvmanikantasrivishnu7788
    @msvmanikantasrivishnu7788 3 года назад

    I am here... thank you...

  • @whoman7930
    @whoman7930 3 года назад +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?.

    • @STUPIDYOUTUBE_HIDINGMSGS
      @STUPIDYOUTUBE_HIDINGMSGS 3 года назад

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

    • @whoman7930
      @whoman7930 3 года назад +1

      @@STUPIDRUclips_HIDINGMSGS 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.

    • @STUPIDYOUTUBE_HIDINGMSGS
      @STUPIDYOUTUBE_HIDINGMSGS 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 года назад

      @@STUPIDRUclips_HIDINGMSGS 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.

  • @ilvaritoo
    @ilvaritoo 3 года назад

    10/10

  • @testm4826
    @testm4826 2 года назад

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

  • @rememberkismat
    @rememberkismat 2 года назад +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 2 года назад

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

    • @eloielbonnoi
      @eloielbonnoi 2 года назад +1

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

  • @Aloysiusb
    @Aloysiusb 3 года назад

    You are the BEST!

  • @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

  • @md.farukuzzaman3911
    @md.farukuzzaman3911 3 года назад +2

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

  • @techmathy5764
    @techmathy5764 3 года назад

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

  • @ashkanahmadi
    @ashkanahmadi 3 года назад +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 RUclips 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  3 года назад +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 3 года назад

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

  • @bikashgurung3830
    @bikashgurung3830 3 года назад

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

    • @LearnWebCode
      @LearnWebCode  3 года назад +1

      Thanks! My reaction: 🙂

    • @tapankumarbaral1244
      @tapankumarbaral1244 3 года назад

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

  • @computerscience1099
    @computerscience1099 3 года назад

    waiting for user auth video :)

  • @kenansari
    @kenansari 3 года назад

    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  3 года назад

      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.

  • @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.

  • @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

  • @mhmdabubakar98
    @mhmdabubakar98 3 года назад

    u r

  • @streamx2
    @streamx2 3 года назад

    Is the next video coming up tomorrow?

  • @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

  • @paulblack7919
    @paulblack7919 2 года назад

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

  • @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")

  • @lardosian
    @lardosian 3 года назад +1

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

  • @jackendycherenfant3929
    @jackendycherenfant3929 3 года назад

    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  3 года назад

      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 3 года назад

      @@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.

  • @federicoraulmaciasaparicio1339
    @federicoraulmaciasaparicio1339 3 года назад

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

    • @LearnWebCode
      @LearnWebCode  3 года назад

      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/

  • @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 2 года назад

      @@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.

  • @ReinforcedState
    @ReinforcedState 3 года назад +2

    in 2021 its saying db is undefined

  • @SLP1177
    @SLP1177 3 года назад

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

  • @dastgirakhtar9782
    @dastgirakhtar9782 3 года назад

    Not working version error still

    • @LearnWebCode
      @LearnWebCode  3 года назад +1

      What does the error message say?

    • @dastgirakhtar9782
      @dastgirakhtar9782 3 года назад +1

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

  • @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 ...

  • @AnonymousAccount514
    @AnonymousAccount514 3 года назад +1

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

    • @LearnWebCode
      @LearnWebCode  3 года назад +1

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

    • @shahriarparvezshuvo4760
      @shahriarparvezshuvo4760 3 года назад +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. 🔥

  • @cd78
    @cd78 3 года назад

    Are folks still using node.

    • @2chikas
      @2chikas 3 года назад

      Do you know of any better option?

  • @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. ;)