Hosting a Specific Folder in Your Repository

Krish Jotaniya
3 min readDec 1, 2023

--

In a GitHub repository housing both Frontend and Backend folders, the challenge arose: how to host them on different platforms? Frontend set for Vercel’s environment and Backend seeking Render.com. This blog details the steps, discoveries, and victories of uniting these disparate parts under different hosting platforms.

Hosting Frontend Part:

  1. Select the repository in Vercel Or Netlify

2. Click on Root Directory where you will find all the folders select frontend folder.

3. Add Your Environment Variables and click Deploy.

4. The Fronted is Deployed 🎉

Hosting Backend Part:

  1. On Render.com select New Web Services for Nodejs deployment

2. Click On Build and deploy from a Git repository

3. Connect Github or Gitlab account

4. Select the Git repository to deploy

5. In Root Directory type your backend folder name

6. Scroll below and Enter your start command then scroll and click Advanced

7. In Advanced settings add your Environmental Variables

8. Then Click on “Create New Service”

It will take some time to build and deploy your backend.

Hurray 🎉 our MERN stack project has been hosted!

Check out my Product Link Forest https://linkforest.web.app/

Thank You For Reading 🚀

--

--

Krish Jotaniya
Krish Jotaniya

Written by Krish Jotaniya

A self-taught full-stack developer with expertise in the MERN stack. I enjoy problem-solving and have a project-based learning approach to expanding my skills.

No responses yet