How to Connect Node.js App to MongoDB | Node.js & MongoDB Tutorial

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ •

  • @dh1569
    @dh1569 9 місяців тому +4

    Finally, someone who writes an accurate title.
    Nice and efficient. Great video!

  • @samuelomotoso1932
    @samuelomotoso1932 11 місяців тому +1

    I struggled with this for hours, watching different tutorials but this was so straight to the point. Thanks.

  • @kwanelekhumalo
    @kwanelekhumalo 2 роки тому +6

    Took something that most people complicated and then you simplified it. Not too much explaining that's unnecessary. Great video on this!!

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

      Thanks!!

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

      very true. I followed along and the database connected Asap! like..I wasn't believing it ..after a watching many videos with failed attempt.

  • @milesthomas3317
    @milesthomas3317 2 роки тому +14

    Very easy to follow along, and no time wasted! Great tutorial as always!

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

    Thanks for this man. 2nd video of yours I'm watching. The other was a beginner nodejs/Express project. This is my first MongoDB project.
    Keep up the good work!

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

    This helped me a ton after having many headaches trying to connect to mongodb by myself! Thanks!

  • @m.c1299
    @m.c1299 Рік тому +2

    Thank you for the video idk why but this is the only video that worked for me ? Every other time it wouldn't connect? Thanks again!

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

    Such a simple and Perfect tutorial which I wanted

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

    Very grateful Arpane you split part to be well understood by beginners

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

    Thank you a lot Arpan^^ , great job !

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

    I love you man. Make my life so much easier

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

    most helpful video I've seen

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

    You really nailed it! Thank you~!!!!

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

    Thank You soo much for making this video it is really helpful

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

    Great tutorial video, thanks!

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

    Thanks Bruh.. Helps me a lot

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

    Even the beast approves

  • @29snapdragons
    @29snapdragons 2 роки тому

    Thanks - easy steps to follow!

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

    great tutorial, thanks

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

    is it mandatory to create an account? What If I just want to test my stuff locally using the ecompass from mongo and my node setup?

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

    Hey there what is the visual studio code theme?

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

    if you get the DeprecationWarning that means you're working in the latest mongodbversion like me so what you do is in the line inside the async function
    async function connect(){
    try{
    mongoose.set('strictQuery', true);
    await mongoose.connect(uri);
    // await mongoose.connect(uri);
    console.log("connected to mongoDB");
    }catch(error){
    console.error(error);
    }
    }
    connect();

  • @muhammadshoaib9014
    @muhammadshoaib9014 9 місяців тому

    Very very Nice tutorial

  • @MohamedReda-yi7xd
    @MohamedReda-yi7xd Рік тому +1

    thank you, it worked!

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

    bro what is your vscode theme and font colors?

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

    very helpful. thank you

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

    thanks bro it helps me lot

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

    Would it be any different if you installed mongodb locally on your computer and used it as an application rather than through the website (cloud)?

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

    thank it was very helpful

  • @19cornholio90
    @19cornholio90 Рік тому

    Great vid!

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

    What's your keyboard and vs code theme? 😅

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

      My keyboard is a Keychron K2 V2 Wireless Mechanical Keyboard and my color theme is the Panda Theme from VSCode Extensions.

  • @mr.x5131
    @mr.x5131 Рік тому

    Bro did u use any rest Api here..?

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

    contenido extenso y muy útil caballero. enhorabuena y gracias 👌

  • @villocity5794
    @villocity5794 Місяць тому

    Would it matter if I pick google cloud instead of Amazon AWS? Does it change anything I should be worried about?

  • @daughter_of_chitkute0611
    @daughter_of_chitkute0611 9 місяців тому

    inside one connection if I want to connect to a specific database then how am I supposed to do it??

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

    great video

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

    Best Video Ever!

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

    While connecting to cluster why can't I see myFirstDatabase option in the connection string?

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

      Do you mean the connection string in the video or the connecting string that's shown on the webpage?

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

      Yeah it's different for me, too. There is no database name in my string when I copy it from the website.

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

      @@Xxxsorrow What is the name that you chose for the database?

  • @chidinmaonyeri7078
    @chidinmaonyeri7078 11 місяців тому

    Please how do I know the terminal to use
    I'm quite confused on that part

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

    perfect. thanks!

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

    7:54 what? there's a part missing here

  • @nikhil17141
    @nikhil17141 8 місяців тому

    I guess the interface is different now, could you update

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

    Thank you, i'm connected to my Database! I tried a few times and it didnt work

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

    am getting an error "URI malformed, cannot be parsed".................Please help

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

    how long have you been coding?

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

      I believe for about 2.5 years.

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

      @@ArpanNeupaneProductions connecting between mongobd and node il connect function wrk chaeyunillaalo y ? Ariyamo?

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

    Error connecting to the database: MongoServerError: bad auth : authentication failed
    at Connection.onMessage (C:\Users\vijay.chandhu\Desktop
    ew-mern\mern-login-system-2022\server
    ode_modules\mongodb\lib\cmap\connection.js:207:30)
    at MessageStream. (C:\Users\v

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

    how can we develop a log in registration form and authenticate it ?

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

      If you're using Node and another frontend library (React, Angular, etc), you can use JWT authentication. If you're just using Node and HTML, you can use sessions.

  • @heshamelmesalmy5950
    @heshamelmesalmy5950 6 місяців тому

    please help ..... error :
    SyntaxError: Unexpected token '.'
    ←[90m at Object.compileFunction (vm.js:344:18)←[39m
    ←[90m at wrapSafe (internal/modules/cjs/loader.js:1048:15)←[39m
    ←[90m at Module._compile (internal/modules/cjs/loader.js:1082:27)←[39m
    ←[90m at Object.Module._extensions..js (internal/modules/cjs/loader.js:1138:10)←[39m
    ←[90m at Module.load (internal/modules/cjs/loader.js:982:32)←[39m
    ←[90m at Function.Module._load (internal/modules/cjs/loader.js:875:14)←[39m
    ←[90m at Module.require (internal/modules/cjs/loader.js:1022:19)←[39m
    ←[90m at require (internal/modules/cjs/helpers.js:72:18)←[39m
    at Object. (D:\Programming\Node JS\code\server
    ode_modules\←[4mmongodb←[24m\lib\index.js:6:17)
    ←[90m at Module._compile (internal/modules/cjs/loader.js:1118:30)←[39m
    PS D:\Programming\Node JS\code\server>
    my steps is :
    const express = require("express");
    const mongoose = require("mongoose");
    const app = express();
    const uri =
    "mongodb+srv://localhost:27017";
    async function connect() {
    try {
    await mongoose.connect(uri);
    console.log("Connected to MongoDB");
    } catch (error) {
    console.error(error);
    }
    }
    connect();
    app.listen(3000, () => {
    console.log("Server started on port 3000");
    });

  • @hend9745
    @hend9745 6 місяців тому

    thank you!

  • @MieMie-zp1lo
    @MieMie-zp1lo 2 роки тому

    Hello, I can't connect with mongodb and nodejs . Please help me!

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

      Connect chaetharno

  • @jaop-r5c
    @jaop-r5c Рік тому

    thank you so much

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

    It's important not to use a public network

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

    THANK YOU

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

    Perfect

  • @kevinmaurice1531
    @kevinmaurice1531 11 місяців тому

    life saver

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

    comm sfaccimm t'am vita mij thank you so much

    • @SalimOfShadow
      @SalimOfShadow 11 місяців тому

      O sfacimm sono felice che tu ce l'abbia fatta

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

    a single frame revealed your ip address

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

    perfecto :)

  • @ФеликСтадник
    @ФеликСтадник 11 місяців тому

    good

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

    thanks

  • @inam.ur.rehmannami9756
    @inam.ur.rehmannami9756 Рік тому

    Kia aap ko urdu ni haati

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

    🤙

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

    Why are you afraid of people seeing your IP... -_-