socket io's docs state that u can use the built in node server and make that the entry point for the app. Do you think making a separate backend like you did is a cleaner way?
Bro please help me... I built an entire chat app using next js and separate socket io server as you did in this video... But after completing i realised that I can't deploy it for free... Can you please help me... Is there any way to deploy for free or we can't deploy app like this...???
@@Aditya-lc5uk @@Aditya-lc5uknope bro. I tried deploying my socket server to aws ec2 and it works with separate server... But AWS is not free right so I just deployed the Next JS app to vercel but realtime feature will not work... If you thinking to build a realtime chat app use pusher instead of separate backend server with Next JS so that you can deploy it to vercel for free and realtime feature will also works... Research about pusher...
@@Aditya-lc5uk nope these are all for static website so the seperate socket server will not work with next js if we deploy it to any free service like vercel, render etc...
Thank you bro
socket io's docs state that u can use the built in node server and make that the entry point for the app. Do you think making a separate backend like you did is a cleaner way?
Yeah i have heard from senior devs that having a separate backend is better than using built in server
How to access the io socket instance in different backend route
Bro, you saved me
happy to help
hi @100xdevs, i am getting cors error after deploying to vercel, do you know what's wrong?
Share ur cross error code.
@@mahadihassan7965 hi, apologies, but I managed to solve my cors issue. Thanks!
A kind request, i would like to deploy the above code. What would be the best approach? Thanking you in advance!
hi @100xdevs, i am getting cors error in my local, i am already setup cors for localhost:3000 (nextjs app) but still get cors error.
Bro please help me... I built an entire chat app using next js and separate socket io server as you did in this video... But after completing i realised that I can't deploy it for free... Can you please help me... Is there any way to deploy for free or we can't deploy app like this...???
i think you can deploy it on render for free
@@Aditya-lc5uk @@Aditya-lc5uknope bro. I tried deploying my socket server to aws ec2 and it works with separate server... But AWS is not free right so I just deployed the Next JS app to vercel but realtime feature will not work... If you thinking to build a realtime chat app use pusher instead of separate backend server with Next JS so that you can deploy it to vercel for free and realtime feature will also works... Research about pusher...
@@Aditya-lc5uk nope these are all for static website so the seperate socket server will not work with next js if we deploy it to any free service like vercel, render etc...