This project provides 2 parts, back-end and front-end. Backend provides an API to receive the csv file and return the result.
On the front-end, user can upload the file and get the result.
Developed on nodejs (express). The api which accepts file input and return the result: api/process-stock-data
.
Sample curl command:
curl --location 'http://0.0.0.0:3001/api/process-stock-data' \ --form 'file=@"file_name.csv"'
Sample successful response:
{
"code": 200,
"message": "Service returned result successfully",
"data": {
"company": "OQB",
"incremental-value": "850.00"
}
}
cd backend
npm install
node index.js
ornpm start
Front-end used React (create-react-app), which user can upload file and get result from backend.
cd frontend
npm install
npm start
/test-data-file/values.csv
Result screenshot:
/test-data-file/values_2.csv
Result screenshot: