This repository contains a React frontend and an Express backend for a career counselling application.
frontend/– React applicationbackend/– Node/Express API
This project is best deployed as two separate services:
- Backend: deploy the
backend/folder to a free Node host such as Render. - Frontend: deploy the
frontend/folder to Netlify.
- Push your repo to GitHub.
- Create a free Render account and import this GitHub repo.
- Create a new Web Service.
- Set the repository root directory to
backend. - Use:
- Build command:
npm install - Start command:
npm start
- Build command:
- Add environment variables in Render:
MONGO_URIJWT_SECRETGOOGLE_API_KEY(optional for AI proxy)
After deployment, copy the backend URL.
-
Create a free Netlify account.
-
In Netlify, add a new site from GitHub and select this repo.
-
Set the build settings as:
- Base directory:
frontend - Build command:
npm run build - Publish directory:
build
- Base directory:
-
In the Netlify environment variables, add:
REACT_APP_API_URL=https://<YOUR_BACKEND_URL>
-
Deploy the site.
- The frontend uses
process.env.REACT_APP_API_URL || '/api', so a deployed frontend can talk to your deployed backend whenREACT_APP_API_URLis set. - If you prefer Vercel, deploy the React app from
frontend/and configure the same environment variable. - If you want to use the same domain for frontend and backend, you can also deploy both under one platform using a monorepo setup, but separating them is easiest.
backend/Procfile– helps Render understand the backend start command.frontend/netlify.toml– helps Netlify build from the monorepo.
If you want, I can also help generate a vercel.json configuration for Vercel or a render.yaml file for Render import.