NextJS backend question
Answered
Least Tern posted this in #help-forum
Least TernOP
Hello, I am currently working on a project that stores user data, something like a social media and it also includes payments and subscriptions. The question is, should I use nextjs integrated backend or should i make seperate expressjs backend to make it more secure?
19 Replies
For me the backend from nextjs is secure and good and I can do all the things I would like to do. I like things like server actions (that can't express provide) and also all the caching stuff is pretty cool. So yes, of course you can use expressjs, but I wouldn't
Least TernOP
Should i use mySql for db or mongo is just fine?
@Least Tern Should i use mySql for db or mongo is just fine?
are you more familiar with mysql or mongo db?
@ᴉuɐpɹɐɐ are you more familiar with mysql or mongo db?
Least TernOP
i often use mongodb, but I am not sure if its good enough for the project
@Least Tern i often use mongodb, but I am not sure if its good enough for the project
do you want to take time in learning something new or do you want to use whats familiar for you?
Least TernOP
I am looking forward to learn
you can use
prisma and let it hit a postgresql BaaS like neon or supabase or ur own local posgresql and have it super easy to use sql-based dbLeast TernOP
huh
i was thinking about prisma
how secure is it?
do you think it would be enough to store users data, images etc?
to store images, you "can" store it on database encoded with base64, but it is most of the time best to use blob hosting (ie cloudflare r2 or vercel blob both with presigned urls for access if needed)
@Least Tern how secure is it?
i would say its more secure since it abstract your sql queries
so if you have developer error it is less likely to cause major fuck ups
Least TernOP
I started with prisma and it looks pretty good
if user uploaded image, r2
Answer
@riský if user uploaded image, r2
Least TernOP
that would be it 😁
thank you guys so much🥰