ExpressJS - MongoDB & Mongoose

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

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

  • @vojinkarisik1554
    @vojinkarisik1554 Год назад

    I like your course very much, you don't waste time on useless information and explain everything in a very simple way using examples. Then, I looked at your RUclips channel, and wow, I have found a treasure... I just wonder how do you have so small number of subscribers... So underrated channel sadly... Anyway, you have a big thanks from me and please keep it up!

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

    Thx for your efforts, valuable tutorials

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

    Hi Anson, thanks for creating such awesome beginner tutorials! I'm just a bit confused with the index.js file in the database directory: since we do not require index.js but the whole database folder in our main file, how will the express app recognize what this file is doing (i.e. establish mongodb connection)? Is it like a default name? Thanks!

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

      The database/index.js file is being imported/required in the main index.js file. If you go to 7:52 in the video, you can see I move the original mongoose.connect() call into the newly created index.js file inside the database folder. Then on line 8 in the main index.js file, it is imported via "require('./database')".

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

      @@ansonthedev oops I missed that...thanks for the explanation!

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

    thanks a lot, amazing tutorial

  • @swopnilmaharjan8630
    @swopnilmaharjan8630 Год назад +2

    so didnt anyone get any errors??
    cause i got a whole lot even when i downloaded zip file form github..
    const err = new MongooseError(message);
    ^
    MongooseError: Operation `users.findOne()` buffering timed out after 10000ms
    so what do u do??

    • @poker1402
      @poker1402 9 месяцев назад +1

      same

    • @poker1402
      @poker1402 8 месяцев назад

      got mine working by changing "localhost" into "127.0.0.1"
      BEFORE:
      "mongodb://localhost:27271/mydb"
      AFTER:
      "mongodb://127.0.0.1:27271/mydb"

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

    As much as this tutorial has shown me about nodejs that I didn't know before, I'm going to continue using SQLite instead. On my Windows machine, it's taking up 900+ mb of space. On my raspberry pi, Mongo and the Arm architecture just do not get along.

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

      why do you relate this course to raspberry pi? Isn't it for robotic and stuff?

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

      @@danielniels22 because it is also a very low cost, albeit slow, desktop computer that I can turn on indefinitely

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

      @@chunkyazian im sorry to ask this. do you have a computer? like asus, mac, acer, and other brand? is it really expensive in your country?

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

      @@danielniels22 I live in HK. Access to reasonably priced computer is not a problem. But I want to raise 3 points.
      1) $$$$$
      2) it's better to develop/test in a lower performance machine to ensure that the app works
      3) iot

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

      @@chunkyazian woah, that sounds really cool. seems like you know a lot about computer and technologies.
      I'm still a college student, but non computer science. I'm kind of shifting into this digital technology field, because I feel my passion is not in my college major. Instead, I enjoy programming, it's been ongoing for about few months (less than a year to be exact)
      may I know how old are you? are you a student or already a professional? how do you learn? you look so talented, wish you best of luck!

  • @alawy5551
    @alawy5551 Год назад

    should I start learn Mongodb before watching this video ?

  • @Fight011
    @Fight011 5 месяцев назад

    haha, you did great there, saying that download it cuz tgere r si may ither tutotiral

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

    did you know that you can do .catch(err => console.log)

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

      yep