#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
Stunning
Thanks Bro 🙂
waiting for next video brother
It's coming Brother ❤️
waiting for next video about migration
Coming Tomorrow 🙂
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. :)
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
@@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.
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.
@@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.
bhaiya my console show You need to provide the MongoDB Connection URI to persist migration status. this error
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 🙂
@@CoderBB bhaiya i got the solution thank you waiting for next video
Cool 🙂
bhai migration banake bhi dikha do.
real world scanrio based.
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. 😇
@@CoderBB Ok bro