This video is about using postgresql as the database with NextJS 13.4. (app router). We will see how to connect next and postgres by using a package called PG and also build a simple CRUD application.
It is not required at first but if you post or if you try to get a some data that you want to render then it will start throwing errors because there won't be a table.
Yeah you don't need to call the dbConnect function. Actually this application was initially made with mongodb as the data base and then dbconnect was required to be called every time a request was made. I just changed the database to postgres and made required changes to the backend. Sorry for the inconvenience.
I usually do share the code but sometimes I just want to upload the video and get done with it. Anyways here is the link to the repo for this video github.com/dhritich20baruah/Postgresql_Projects/tree/master/nextjs_post/src.
Can you do a MySQL version please without using Prisma, I'm working on a project and am using next auth for signup and login but I want to be able to update my user info and also upload profile picture using multer
I don't use prisma instead use pg and I don't want to go through the process of installing MySQL in my computer. Postgres is gaining a lot of traction these days. If you are using next auth try to use the credentials provider with bcrypt or jwt. As for uploading the image you can use a package called formidable here is a link to that video ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-QTD9L0jL0dU.html