This project aims to provide year-wise & cumulative result stats to the students of Kamla Nehru Institute Of Technology, by using the KNIT-Result-API code for the same can be found here (API Credits: karandeep09 )
- Clone the repository 'KNIT-Result' by clicking on the Clone button
https://github.com/ansi22/KNIT-Result.git
. Alternatively, download the repository. - Navigate to the folder
$ cd KNIT-Result
- Install all the required dependencies
$ npm i
- Find following code in
App.js
file in root directory:
const fetch_api = async () => {
axios
.get(`/api/cache?roll=${rollno}`, {
headers: {
"Access-Control-Allow-Origin": "*",
"Content-type": "application/json; charset=UTF-8",
},
})
.then((res) => {
const resp = res.data;
console.log(resp);
setValue(resp);
})
};
- Remove prefix
/api
from
axios.get(`/api/cache?roll=${rollno},...
- Remove file
_redirects
from public folder - To run the application:
$ npm start
- Inside your browser, navigate to the link
localhost:3000
- Proxy-server works fine in the local development only.
- Refer to react docs or netlify docs incase of Proxying API Requests in Development mode.