#19 - Database Migration | MongoDB | Complete Node JS Production Setup | JavaScript

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024
  • mongodb tutorial
    mongoose tutorial
    mongodb migration
    database migration
    mongoose
    migrate-mongo
    ts-migrate-mongoose
    mongoose orm
    database orm
    sequelize
    typeorm
    db migration
    database changes
    database schema
    mongodb schema
    node js production setup
    express js tutorial
    node js tutorial
    typescript setup
    typescript with express
    node js tutorial
    coding in hindi

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

  • @Ramesh-fz4un
    @Ramesh-fz4un Месяц назад +1

    Stunning

    • @CoderBB
      @CoderBB  Месяц назад

      Thanks Bro 🙂

  • @masumtrivedi2009
    @masumtrivedi2009 Месяц назад +1

    waiting for next video brother

    • @CoderBB
      @CoderBB  Месяц назад

      It's coming Brother ❤️

  • @anishbishnoi29xD
    @anishbishnoi29xD Месяц назад +1

    waiting for next video about migration

    • @CoderBB
      @CoderBB  Месяц назад

      Coming Tomorrow 🙂

  • @AnishBishnoi-wf7lv
    @AnishBishnoi-wf7lv Месяц назад +1

    bhai ek time pe ek hi user login rahe ager same account ko koi or open kare to first wala automatic logout ho jaye ye kese krte hai express me video bana do. :)

    • @CoderBB
      @CoderBB  Месяц назад

      Very simple bro. You can just store the user access token in database that's it.
      Let say if first person login then the access token will be stored in db .
      Now second person login from same account then the previous access token will be replaced in db hence the first logged in person will get 401 due to token replacement

    • @AnishBishnoi-wf7lv
      @AnishBishnoi-wf7lv Месяц назад +1

      @@CoderBB fir bhai api me har middleware me fir db calls laga ke token check krna padega.
      login pe to token store krwake invalid ho jayega but if user ne logout nae kia to utne time tak dusra user to same token api header me send kr ke ke use kr lega. or if middlware me api calls lagate hai check ke liye to bhot bar api calls lagegi fir.

    • @CoderBB
      @CoderBB  Месяц назад

      For that let say if first person is sending a request again then first time you will verify the token in db if you don't get it then simply clear the accessToken cookie
      Now with the next call as there is no accessToken present in cookie there will be no db call.

    • @AnishBishnoi-wf7lv
      @AnishBishnoi-wf7lv Месяц назад

      @@CoderBB yes but fir ager token hua suppose. chahey ek person use kr raha ho to db me token h ya nae dekhne ke liye har bar 1 call to lagegi fir middleware me. solution me dhundh raha hu net pe but mil nae raha without db calls wala.

  • @weirdrishu5836
    @weirdrishu5836 Месяц назад +1

    bhaiya my console show You need to provide the MongoDB Connection URI to persist migration status. this error

    • @CoderBB
      @CoderBB  Месяц назад

      I think you might have done the typo in MIGRATE_MODE env variable or your .env.development file does not have MIGRATE_MONGO_URI
      I've shown that part in the video. So I think that might solve the issue otherwise today i will push the changes to GitHub and you can refer them 🙂

    • @weirdrishu5836
      @weirdrishu5836 Месяц назад +1

      @@CoderBB bhaiya i got the solution thank you waiting for next video

    • @CoderBB
      @CoderBB  Месяц назад

      Cool 🙂

  • @anishbishnoi29xD
    @anishbishnoi29xD Месяц назад

    bhai migration banake bhi dikha do.
    real world scanrio based.

    • @CoderBB
      @CoderBB  Месяц назад +1

      Yes bro i will create detailed video on migration but if i cover that in this series then it goes off topic so. But will soon create it. 😇

    • @anishbishnoi29xD
      @anishbishnoi29xD Месяц назад +1

      @@CoderBB Ok bro