This project involves designing an online Job Portal UI using React JS (Vite build), JSON Server as a mock backend, and Netlify functions.
Website Live at https://stupendous-meerkat-014f48.netlify.app/
If running locally, follow the below commands.
npm install
The server will run on http://localhost:8000
npm run server
React will run on http://localhost:5173
npm run dev
npm run build
Refer the jobs.cjs file for the deployed netlify function that handles JSON requests from the React App. We use the JSON Server while working locally. However, we can also test & use the netlify function locally, which runs on http://localhost:8888
netlify dev
After testing, we can deploy the netlify function by using:
netlify deploy
The structure of the code was tested locally using a mock JSON Server and then tweaked to run on the netlify website. Therefore, we may need to make some changes in the endpoints of the JSON requests for enabling the React App to fetch jobs data from the JSON file.
This involves changing the endpoints in the Vite config, Netlify config and the Netlify function to the relevant local host address and port.