Тёмный

🔴 Connect MongoDB Atlas with NodeJS using Mongoose 

New Age Coder
Подписаться 336
Просмотров 25 тыс.
50% 1

Опубликовано:

 

27 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 54   
@amritapattnaik3345
@amritapattnaik3345 Год назад
can someone paste the code :)
@newagecoder5417
@newagecoder5417 Год назад
Sure
@amritapattnaik3345
@amritapattnaik3345 Год назад
@@newagecoder5417 code ?and if you have the docker file for this ?
@newagecoder5417
@newagecoder5417 Год назад
const express = require("express"); const app = express(); const mongoose = require("mongoose"); // Database const database = (module.exports = () => { const connectionParams = { useNewUrlParser: true, useUnifiedTopology: true, }; try { mongoose.connect( "mongodb+srv://username:password@cluster0.0ehgx.mongodb.net/mongodb?retryWrites=true&w=majority", connectionParams ); console.log("Database connected succesfully"); } catch (error) { console.log(error); console.log("Database connection failed"); } }); database(); app.listen(3000, () => { console.log("Server is running on port 3000"); });
@newagecoder5417
@newagecoder5417 Год назад
@@amritapattnaik3345 sorry but I don't have it
@newagecoder5417
@newagecoder5417 Год назад
@@amritapattnaik3345 hmm sorry u need to use your let me edit it, Use your BCS It will not work
@bartjunior1
@bartjunior1 Год назад
Brother, here in Brazil I really needed to learn this connection, but here it is very difficult to find someone to explain how to make the connection, I'm glad I found your video. For me it was a great class, you gained another follower.
@newagecoder5417
@newagecoder5417 Год назад
thank u soo much bro love u from india ❤❤
@kramerkramer-yl7us
@kramerkramer-yl7us 11 месяцев назад
thanks alot you saved me
@raveclipsbypayrave4578
@raveclipsbypayrave4578 2 года назад
Bro. I was having an issue with installing this for over 6 hours. I watched videos from even MongoDB themselves and couldn’t solve the issue. I just decided to give your video a try and it worked immediately! You’ve earned yourself a subscriber and constant video watcher! Thanks for releasing this video. I am honestly happy I found you. Cheers!
@newagecoder5417
@newagecoder5417 2 года назад
Thank u so so so much bro ❤️ for your support And you have given me a lot of motivation 🙂
@raveclipsbypayrave4578
@raveclipsbypayrave4578 2 года назад
@@newagecoder5417 🔥
@newagecoder5417
@newagecoder5417 2 года назад
​@@raveclipsbypayrave4578 Hi bro hope you are fine I need ur help. Can you help me make a video 📹. Are you facing any errors which I can help you?
@raveclipsbypayrave4578
@raveclipsbypayrave4578 2 года назад
@@newagecoder5417 yeah. I’m finding it hard to use checkboxes in react. If you could make a video where you use checkboxes and display what was chosen on a single page, that’d be cool
@newagecoder5417
@newagecoder5417 2 года назад
@@raveclipsbypayrave4578 awesome bro video coming soon
@solanaromero2085
@solanaromero2085 2 года назад
Thank you so much for this video. Ive been trying to connect the atlas to my project for about 2 hours now and I couldnt make it work, but thanks to you I could!!!! Omg I'm so happy! thank you thank you thank you thank you!!!!
@newagecoder5417
@newagecoder5417 2 года назад
🎉 congratulations bow you can start your work
@noanswerrs
@noanswerrs 2 года назад
Thanks very much for making this video, I was stuck in some tutorials that were not working, I tried this and it WORKED, amazing job, also I like this types of video where you don't talk and just have writting so you can follow along easier
@newagecoder5417
@newagecoder5417 2 года назад
Thank you soo much sir. Can you recommend some ideas for more videos
@noanswerrs
@noanswerrs 2 года назад
@@newagecoder5417 I am actually working on a project and will need to do the steps right that come after this. If that's something you would like to do. Keep it up!
@armansyah8892
@armansyah8892 2 года назад
thank you so much bro, u already got a new subscriber here
@newagecoder5417
@newagecoder5417 2 года назад
🧡 thank you arman I am really glad that this video helped you
@MrDubYT
@MrDubYT Год назад
Thanks bro. i rlly need a short video of this
@archipremium
@archipremium Год назад
thanks, your videos really helped me
@johncullen5903
@johncullen5903 2 года назад
Thank you for this video, New Age Coder. It really helped!😀😁
@newagecoder5417
@newagecoder5417 2 года назад
Thank you ❤️
@saharzada9773
@saharzada9773 2 года назад
thanks man really helped me here
@newagecoder5417
@newagecoder5417 2 года назад
I am glad that it helped 🥰
@njorogekamau3820
@njorogekamau3820 2 года назад
Thanks Man !
@newagecoder5417
@newagecoder5417 2 года назад
💝
@aquib399
@aquib399 Год назад
Thanks bro and what snippets and themes are u using, they seems awesome
@sanhtran8588
@sanhtran8588 2 года назад
Thank you! It helped me to solve the problem
@newagecoder5417
@newagecoder5417 2 года назад
Welcome sir
@suminbaek
@suminbaek Год назад
Thanks a lot!!
@fernandolopez6853
@fernandolopez6853 2 года назад
Buen video , solucion facil y rapida👌👍
@newagecoder5417
@newagecoder5417 2 года назад
Thank you 💖😌
@austinlynch7490
@austinlynch7490 7 месяцев назад
great work
@cagr9944
@cagr9944 Год назад
Thanks
@sahilraut8758
@sahilraut8758 Год назад
bro it's showing me error by saying database connection is failed
@newagecoder5417
@newagecoder5417 Год назад
Hi Sahil, did you paste the password and username correctly for Moongodb connection as shown in the 13th line please check and let me know
@mohamedelaatfi1162
@mohamedelaatfi1162 10 месяцев назад
THANK YOUUUUUUUUUUUUUUUUUUUUUUUUUU
@khumbozimba7521
@khumbozimba7521 2 года назад
what extension are you using for the autocompletion?
@newagecoder5417
@newagecoder5417 2 года назад
Github copilot
@sushantdivekar6013
@sushantdivekar6013 Год назад
🙏
@aiswaryam6298
@aiswaryam6298 11 месяцев назад
Showing error in connection of ip address,
@mohalhakeem
@mohalhakeem 2 года назад
Instead of typing in Notepad you can use free video apps such as DaVinci Resolve and add text on the video...
@newagecoder5417
@newagecoder5417 2 года назад
Thank u for your opinion sir, I will definitely do it
@sanchalisharma9149
@sanchalisharma9149 Год назад
distracted constantly by notepad
@newagecoder5417
@newagecoder5417 Год назад
const express = require("express"); const app = express(); const mongoose = require("mongoose"); // Database const database = (module.exports = () => { const connectionParams = { useNewUrlParser: true, useUnifiedTopology: true, }; try { mongoose.connect( "mongodb+srv://username:password@cluster0.0ehgx.mongodb.net/mongodb?retryWrites=true&w=majority", connectionParams ); console.log("Database connected succesfully"); } catch (error) { console.log(error); console.log("Database connection failed"); } }); database(); app.listen(3000, () => { console.log("Server is running on port 3000"); });
@newagecoder5417
@newagecoder5417 Год назад
take this code and paste it on your file and change the username and password thank u
@sanchalisharma9149
@sanchalisharma9149 Год назад
@@newagecoder5417 and I was so frustrated because of that I watched your video and still get nothing. So I wrote that.🙂🙂
@newagecoder5417
@newagecoder5417 Год назад
@@sanchalisharma9149 No problem, is it working now?
@sanchalisharma9149
@sanchalisharma9149 Год назад
@@newagecoder5417 unfortunately no . I have put the whole URL directly . .env is not working.
Далее
Connecting NodeJS with MongoDB | Mongoose + Express
19:18
Connect Mongodb Atlas to nodejs and Express Server
34:40