MERN Stack deployment on Vercel and Render | Deploy node.js and React app for free

In this video you will learn about deploying your backend and fronted both on different servers which is render.com and vercel.com
Deployed link : vicharlikhita.vercel.app/
This is my way of doing things if you have any other ways you share it in the comment section below.
Deploy your Full Stack Application in just 19 minutes
Backend Deployment 🚩
Step 1 : Connect mongoDB Atlas as a database
Step 2 : Create .env file and add environment variables
Step 3 : Push your code to Github
Step 4 : Deploy your backend to render.com
Fronted Deployment 🚩
You can use CLI (Command line interface) or Graphical user interface to deploy your react.js application
🎓Useful Links
Deploy backend on render.com/
Deploy fronted on vercel.com/
Chapters
00:00 Intro to deployment
00:28 Folder structure explanation
01:20 Connect to Database to Mongo Atlas
04:00 Create .env file
07:25 push code to github
08:51 Deploy backend on render
11:14 Check if fronted is working with deployed backend
14:20 Deploy fronted on vercel
17:22 Redeploy backend when code is updated
18:19 Redeploy fronted when code is updated
19:00 Highlighting comments
Please do not forget to subscribe to my KZread channel ‪@SumansAcademy‬

Пікірлер: 128

  • @hemantvishwakarma8751
    @hemantvishwakarma87516 ай бұрын

    Thankyou so much... I have watched more than 15 videos but was not able to deploy... But now, by your video I have deployed my first web app....Thankyou so muchh❤❤❤

  • @SumansAcademy

    @SumansAcademy

    6 ай бұрын

    I'm thrilled to hear that you're happy! Your appreciation means lot to me❤️.

  • @rutikamble

    @rutikamble

    24 күн бұрын

    Same

  • @mind_blazed
    @mind_blazed4 ай бұрын

    Thank you so much . i've watched lots of videos but not working . but this is really helpful and succesfully deployed

  • @MALLuKAPzTECHz
    @MALLuKAPzTECHz3 ай бұрын

    Subscribed I was looking for this video

  • @we-are-engineers
    @we-are-engineers3 ай бұрын

    Amazingly described ❤

  • @kartikay0111
    @kartikay01113 ай бұрын

    Finally I was able to deploy Thanks

  • @apnifamily-vy8my
    @apnifamily-vy8my6 ай бұрын

    Thanks 😊. Helpful information.

  • @SumansAcademy

    @SumansAcademy

    6 ай бұрын

    So nice of you

  • @pawankumarmandaloju3846
    @pawankumarmandaloju3846Ай бұрын

    Thank you for the information 🙏😊

  • @RedZunamyBlogspotZ
    @RedZunamyBlogspotZ2 ай бұрын

    Gracias de tanto buscar al fin alguien lo explica bien.

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    ¡De nada! Me alegra saber que finalmente encontraste una explicación que te ayudó. Si tienes alguna otra pregunta o necesitas más ayuda, no dudes en preguntar. ¡Feliz codificación! 😊✨

  • @AbdulSamad-kb3sm
    @AbdulSamad-kb3sm2 ай бұрын

    Thank you soo much, explanation is very clear and easy. thank you once again👌👌💕💕

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    You are welcome 😊

  • @ankit21309
    @ankit21309Ай бұрын

    Informative !!

  • @AmruthShyju
    @AmruthShyju2 ай бұрын

    Thank You So much 💚💚

  • @priyaarya6883
    @priyaarya68832 ай бұрын

    Thankyou so much you helped me alot really worked. Earlier I was getting issue when I type vercel on cli then I saw I had to do vercel init at first then it worked 😅 if anyone is getting the same issue you can solve it through this message coders 😁🤭🙏 . And thankyou mam from 2 days I was trying and searching for such type of content you posted 🤗✨

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    You're welcome! I'm glad to hear that the solution worked for you. If anyone else is facing the same issue with Vercel, remember to use `vercel init` first to get things set up. It can save a lot of time and frustration. Thank you for sharing your experience and helping others with the same problem. Happy coding! 😊✨

  • @dictator2852
    @dictator285222 күн бұрын

    great and very easy explanation

  • @SumansAcademy

    @SumansAcademy

    22 күн бұрын

    Thank you

  • @nivi_verse
    @nivi_verse4 ай бұрын

    Thank you so much 🎉🎉🎉

  • @ManpreetSingh-bk7yc
    @ManpreetSingh-bk7yc4 ай бұрын

    AMAZING VIDEO

  • @vijayaragavan4168
    @vijayaragavan41686 ай бұрын

    Thank you so much ❤️🎉

  • @SumansAcademy

    @SumansAcademy

    6 ай бұрын

    You’re welcome 😊

  • @rutikamble
    @rutikamble24 күн бұрын

    Thank you mam

  • @gamerzhill8849
    @gamerzhill88492 ай бұрын

    its really useful

  • @webturtles
    @webturtles6 ай бұрын

    Found helpful Thanks

  • @SumansAcademy

    @SumansAcademy

    6 ай бұрын

    Glad it helped

  • @SurajSURAJ-hm9kb
    @SurajSURAJ-hm9kb6 ай бұрын

    Giving nice information 👍😊

  • @SumansAcademy

    @SumansAcademy

    6 ай бұрын

    Thanks for liking

  • @veldhisandeep9945
    @veldhisandeep99453 ай бұрын

    Done thanks a lot

  • @devmehta200
    @devmehta2002 ай бұрын

    personally i can say best ever video on internet explaining how to deploy web app , crystal clear explanation but mam i have one question i have used multer for image upload and i am giving path of that in my vite.config.js file so how to deal with that while deploying app please answer mam

  • @saitejakarri8512
    @saitejakarri8512Ай бұрын

    Thank you veru much..

  • @SumansAcademy

    @SumansAcademy

    Ай бұрын

    You're welcome! Happy coding ✌️

  • @Leetcode194
    @Leetcode1943 күн бұрын

    Thanks

  • @yousseferaky8665
    @yousseferaky86655 ай бұрын

    شكراااا ❤❤

  • @hamzaazam203
    @hamzaazam2032 ай бұрын

    im maked the three folder in my project websocket, frontend and backend. where can i upload the websocket folder on which website.

  • @realpriyanshu02
    @realpriyanshu0212 күн бұрын

    best

  • @sanketkamble4705
    @sanketkamble47053 ай бұрын

    hello. why did you deploy on two different servers? are they fast or something for node and react ?

  • @afroz1189
    @afroz11893 ай бұрын

    Hello, I followed all the steps and deployed backed but after clicking on link it says cannot get/.. Any help will be appreciated.

  • @thorenjp
    @thorenjp4 ай бұрын

    How can i deploy a json server api im unable to fetch api with my project after deployed on netlify 😢

  • @csayantan
    @csayantan3 ай бұрын

    backend and frontend separately is very wirdo idea for productions as it will publish whole data whoever hit the URL. it will be better if we can maintain these access from the application side only.

  • @Uv_Yadav04
    @Uv_Yadav043 ай бұрын

    Can't we deploy frontend on render.. When i am doing so, It's saying no open http port detected

  • @thisaragunasekara924
    @thisaragunasekara9244 ай бұрын

    Hii can i know how many applications can we deploy in this way only one web site?

  • @paramveer3590
    @paramveer35902 ай бұрын

    Thank you so much ma'am, i watched around 15 to 20 videos but nothing worked. I was very upset but now I'm so happy ❤ dher sara pyaar🙏🙏🙏🙏🙏🙏🙏🙏🙏

  • @top_g755

    @top_g755

    2 ай бұрын

    Bro help me

  • @top_g755

    @top_g755

    2 ай бұрын

    Error aa rha hai

  • @top_g755

    @top_g755

    2 ай бұрын

    Module not found

  • @paramveer3590

    @paramveer3590

    2 ай бұрын

    @@top_g755 browser pe code run ho rha he kya? Deploy se pehle Frontend backend achhe se chal rha he?

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    Most welcome 😊

  • @mrsecretstatus9999
    @mrsecretstatus99994 ай бұрын

    I have done all steps correctly but I am not to login into my application, I don’t why but I am getting loging successfully message and my cookies is storing correctly. Can any one help me please

  • @user-dj8hh7ys2f
    @user-dj8hh7ys2f5 ай бұрын

    i have three files frontend , backend and admin panel. For admin i want to deploy it seperately or with the backend

  • @nivi_verse

    @nivi_verse

    4 ай бұрын

    Same doubt

  • @_aakashsaini
    @_aakashsaini2 ай бұрын

    vercel command not working in frontend. I run the command 'npm i vercel' but it's still not working. Don't know what's wrong...

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    Use this command : npm i -g vercel

  • @_aakashsaini

    @_aakashsaini

    2 ай бұрын

    @@SumansAcademy tnx.😄😄

  • @aakashsaini3963

    @aakashsaini3963

    Ай бұрын

    Same doubt same name bhai 😂😂

  • @SumansAcademy

    @SumansAcademy

    Ай бұрын

    What a coincidence! 💀💀

  • @aakashsaini3963

    @aakashsaini3963

    Ай бұрын

    Above mentioned command is take so much time and leaked the memory not working

  • @ManpreetSingh-bk7yc
    @ManpreetSingh-bk7yc4 ай бұрын

    I was able to host both frontend and backend on render itself .why you host seprately?? by the way i hosted html css js express js mongo db without react website

  • @pratapbairagi7824

    @pratapbairagi7824

    Ай бұрын

    Any guide?

  • @mausam_007
    @mausam_0074 ай бұрын

    I'm trying to access my web page and there is an error in the console:- failed to load resource: the server responded with a status of 404 ///// actually in locally it's working fine .. pls help me

  • @SumansAcademy

    @SumansAcademy

    4 ай бұрын

    In Render.com check in Logs you will get details why you are getting that 404 error. If you have time then try to deploy it once again. Failed to load it had happened with me also. I deployed it again then it worked.

  • @shashwatsingh2748
    @shashwatsingh27485 ай бұрын

    At 3:19 , is there any problem if we choose Compass instead of drivers ?

  • @mrsecretstatus9999

    @mrsecretstatus9999

    4 ай бұрын

    Compass is for running locally, while deploying we need to use driver only.

  • @sayanmaity7630
    @sayanmaity76302 ай бұрын

    Hello ma’am ! I tried deploying my MERN e-commerce website with this process. While everything turned out to be fine but in the frontend, the images are blank. No matter what I do, it isn’t showing. Any suggestion?

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    Are you uploading your images to the backend and then fetching in to the fronted. And then it is showing black? Or you are using url's to show images?

  • @isaacnjenga4184
    @isaacnjenga41843 ай бұрын

    do you have a tutorial on uploading images to the backend and displaying on the frontend?

  • @SumansAcademy

    @SumansAcademy

    3 ай бұрын

    Wait I will create it for you. Give me some time.

  • @isaacnjenga4184

    @isaacnjenga4184

    3 ай бұрын

    ok, thank you@@SumansAcademy

  • @GiuranRadu
    @GiuranRadu3 ай бұрын

    Important question! Does uploading files/images still works?

  • @SumansAcademy

    @SumansAcademy

    3 ай бұрын

    Yes it still works. Please create your new account and check. If you are using the user credentials given in this video then it may not work because accidentally I removed that file from my database.

  • @GiuranRadu

    @GiuranRadu

    3 ай бұрын

    ​@@SumansAcademy Thanks for your fast reply. I have a 7$ monthly plan on Render and i really can't succeed to configure it. I think it will be a good video for future... now i'm using Cloudinary as an alternative to upload images

  • @ZahidKhan-bg1uv
    @ZahidKhan-bg1uv2 ай бұрын

    Ma'am can you share the video of your project developement?

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    Deployment of "Vicharlikhita web app" is present in this video only. Which video do you want?

  • @user-tk2rb5xp1i
    @user-tk2rb5xp1i4 күн бұрын

    mam i getting this "Detected a new open port HTTP:8001" and the application is crashig

  • @SumansAcademy

    @SumansAcademy

    4 күн бұрын

    May be another application is using the port your application is trying to use (8001 in this case). const port = process.env.PORT || 3000; // Change 3000 to any other port number

  • @user-tk2rb5xp1i

    @user-tk2rb5xp1i

    4 күн бұрын

    @@SumansAcademy thank you so much mam now it's working

  • @pearlwings_
    @pearlwings_2 ай бұрын

    can you show me the proxy setting

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    I did not set up any proxy.

  • @shivam-mc7sx
    @shivam-mc7sx21 күн бұрын

    i am getting cors errr please help

  • @SumansAcademy

    @SumansAcademy

    21 күн бұрын

    In backend do this. 1. npm i cors 2. In index.js or server. js file write const cors = require ("cors") app.use(cors()) Also sometimes due to network issue you may get cors error.

  • @rishigupta1565
    @rishigupta15653 ай бұрын

    Cannot find module '/opt/render/project/src/index.js

  • @smritigupta9730

    @smritigupta9730

    3 ай бұрын

    getting same error

  • @rishigupta1565

    @rishigupta1565

    3 ай бұрын

    @@smritigupta9730 i solved it

  • @user-tk2rb5xp1i
    @user-tk2rb5xp1i4 күн бұрын

    i am getting this error "err = new ServerSelectionError();" please mam help me to solve this error...i just searched whole youtube and found your video helpful a lot. please mam

  • @SumansAcademy

    @SumansAcademy

    4 күн бұрын

    This error usually occurs when the MongoDB client cannot connect to the MongoDB server. 1. Ensure that your MongoDB server is running. 2. If you are using MongoDB Atlas, make sure your IP address is whitelisted in the network access settings.

  • @user-tk2rb5xp1i

    @user-tk2rb5xp1i

    4 күн бұрын

    @@SumansAcademy This works thank you so much man😊😊

  • @SumansAcademy

    @SumansAcademy

    4 күн бұрын

    Happy coding ❤️

  • @srimanikanta8440
    @srimanikanta8440Ай бұрын

    My backend is perfectly running on my device but when i try to deploy it , its showing deployment failed. Can you please resolve my issue. i am trying to deploy my project since 30 days but still i cant able to deploy

  • @srimanikanta8440

    @srimanikanta8440

    Ай бұрын

    Its Giving nodemon access denied

  • @SumansAcademy

    @SumansAcademy

    Ай бұрын

    Send your source code I will try it from my end. (Github repo)

  • @srimanikanta8440

    @srimanikanta8440

    Ай бұрын

    @@SumansAcademy Thank you. The deployment is successful using your demo itself. But the dynamic process is not working, means I have a uploads folder in the backend in which if we upload any image that will be stored in the uploads folder and in mongoDB I just store the name of the image. So I render the images such that I check the name of the image in DB ans shows the image using uploads folder in the backend. But it's working upto my local host. But when I deployed , the image is not rendering, may be because it cannot enter to uploads folder. 🤧Sorry for asking these much of doubts

  • @SumansAcademy

    @SumansAcademy

    Ай бұрын

    You're welcome! No worries at all about the questions. If you're using only Multer to upload images, try uploading images using the method described in this video: kzread.info/dash/bejne/h4J_s5OCZLKdlbg.html. This has worked for me and might solve the issue with the images not rendering after deployment. Let me know if you need any further assistance!

  • @aakashsaini3963

    @aakashsaini3963

    Ай бұрын

    Can i deploy using multer only

  • @fsnirjhor
    @fsnirjhor4 ай бұрын

    how to host backend on vercel ?

  • @SumansAcademy

    @SumansAcademy

    4 ай бұрын

    You can not deploy backend on vercel. I have once deployed json server on vercel only GET request was working. Rest Other where not working. Vercel is more like deploying frontend application.

  • @top_g755
    @top_g7552 ай бұрын

    Mam help me please on render it's showing module not found error

  • @SumansAcademy

    @SumansAcademy

    2 ай бұрын

    “module not found” error means you are importing a file with a wrong path. Please check all imports and exports in your code.

  • @top_g755

    @top_g755

    2 ай бұрын

    @@SumansAcademy Done mam yesterday I was about to cry😑 But finally it got deployed thankyou mam

  • @prajwalshaw9217
    @prajwalshaw92179 күн бұрын

    Didi main jab render pe backend deploy karne ki kosish kar raha hu toh ek error aa raha hain bar bar. "npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open '/opt/render/project/src/package.json' "... Mere paas toh aisa koi path hain bhi nahi phir pata nahi render kaha point kar raha hain. Kindly guide me.

  • @SumansAcademy

    @SumansAcademy

    9 күн бұрын

    It looks like you're encountering an error because Render is unable to find the package.json file in the expected directory. 1. Check Your Project Structure: Ensure that your package.json file is in the root directory of your project. 2. Update the Build and Start Commands: --> Go to your Render dashboard. --> Navigate to your service settings. --> Ensure your Build Command is correctly pointing to where your package.json is located. For example, if your package.json is in a different directory, you might need to change the build command from npm install to cd && npm install. --> Update your Start Command similarly. If still you are getting error then send me your GitHub repository link. I will check your project structure.

  • @prajwalshaw9217

    @prajwalshaw9217

    9 күн бұрын

    @@SumansAcademy Thanks didi I was able to deploy it on render and vercel. But another issue arrived. Vercel par deploy karne ke baad jo url ko paste kar raha hu toh kuch nahi display ho raha browser par. Error 404 dikha raha hain. Render pe logs par jake check kiya toh waha as such koi error nahi dikha raha. Phirse se ekbar deploy kiya render aur vercel par tab bhi nahi aa rha. Samajh nahi aa raha yeh error.

  • @SumansAcademy

    @SumansAcademy

    9 күн бұрын

    Vercel ka deployed URL work nahi kr raha h kya? Aisa karo browser p vercel.com k website m login karo. Profile k icon m click kr k *Dashboard* page m jao. Waha pr sare deployed projects dekhenge. Usme click kr k *deployments* m jao or dekho kya error h.

  • @prajwalshaw9217

    @prajwalshaw9217

    9 күн бұрын

    @@SumansAcademy Ha didi deployments main Jake current project pe click Kiya aur build logs pe Jake check Kiya toh 0 errors dikha raha hai.

  • @SumansAcademy

    @SumansAcademy

    9 күн бұрын

    If vercel is not working for you then search on youtube for react app development and try to deploy on different platforms such as netlify or github pages.

  • @ezzylearn2065
    @ezzylearn20656 ай бұрын

    Behan vercel ke liye kya install Kiya vercel is not recognised dikha rha ha again and again

  • @SumansAcademy

    @SumansAcademy

    6 ай бұрын

    Run this command to install vercel globally on your system - - - > npm i -g vercel

  • @adarsha001
    @adarsha00125 күн бұрын

    I am getting 404 error

  • @SumansAcademy

    @SumansAcademy

    25 күн бұрын

    In Render.com check in Logs you will get details why you are getting that 404 error. If you have time then try to deploy it once again. Make sure you are giving the root file directory in render. If you are not able to resolve the issue by yourself then write more about the error here.

  • @amstudio3386
    @amstudio33863 ай бұрын

    source code?

  • @SumansAcademy

    @SumansAcademy

    3 ай бұрын

    Fronted : github.com/UmaSahni/VicharlikhitaFronted Backend : github.com/UmaSahni/VicharLikhita

  • @lakshayjain2309
    @lakshayjain23093 ай бұрын

    what about api

  • @SumansAcademy

    @SumansAcademy

    3 ай бұрын

    Till 10:59 we were deploying our api endpoints only on render. Now in place of localhost:8080/ You will use render.com api suppose this - rc-wc0f.onrender.com/

  • @lakshayjain2309

    @lakshayjain2309

    3 ай бұрын

    Thank a lot...this was the easiest way..... helped me a lot​@@SumansAcademy

  • @ssedits9584

    @ssedits9584

    3 ай бұрын

    ​@@SumansAcademydid use window.location.origin

  • @iqraaslam1923
    @iqraaslam1923Ай бұрын

    Render is not free they are asking about credit card info

  • @SumansAcademy

    @SumansAcademy

    Ай бұрын

    Hi @iqraaslam1923, Thank you for your comment! To ensure you can take full advantage of Render's free services without any hassle: Sign In Properly: 1. Make sure to sign in using your original Gmail account or GitHub account via OAuth. Avoid using temporary email services as they may cause issues and might require additional verification, such as credit card information. Choose the Right Instance Type: 2. Once signed in, select the "For hobby projects" instance type during setup. This option is completely free and perfect for small personal projects. If you have any more questions or need further assistance, feel free to ask. I'm here to help!

  • @twosidefact

    @twosidefact

    18 күн бұрын

    select the free version

  • @PM-rs4te
    @PM-rs4te3 ай бұрын

    Having issues with CORS blocking access

  • @SumansAcademy

    @SumansAcademy

    3 ай бұрын

    In backend do this. 1. npm i cors 2. In index.js or server. js file write const cors = require ("cors") app.use(cors())

  • @PM-rs4te

    @PM-rs4te

    3 ай бұрын

    @@SumansAcademy Thank you for the response. Figured it all out.

  • @AnkitKumar-nl6mc
    @AnkitKumar-nl6mc2 ай бұрын

    Hey, i followed the steps but deploy failed on render , please help , please send your contact details where i can text you the problem

  • @parasparashar7720
    @parasparashar77205 ай бұрын

    Thanks