https://github.com/samsoft00/klima-metrix-challenge
Example API to upload a csv file containing the list of companies
https://github.com/samsoft00/klima-metrix-challenge
bull database job-queue microsoft node nodejs queue redis typescript worker
Last synced: 25 days ago
JSON representation
Example API to upload a csv file containing the list of companies
- Host: GitHub
- URL: https://github.com/samsoft00/klima-metrix-challenge
- Owner: samsoft00
- Created: 2020-03-10T10:52:44.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-03-31T02:49:01.000Z (over 5 years ago)
- Last Synced: 2025-04-04T15:15:01.301Z (6 months ago)
- Topics: bull, database, job-queue, microsoft, node, nodejs, queue, redis, typescript, worker
- Language: TypeScript
- Homepage: http://www.oyewoleabayomi.dev
- Size: 2.35 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# klima metrix challenge

## Part I
> Develop a script in JavaScript / TypeScript, which takes a list campanies and checks them against the existing database in a smart way. Create the testing data by yourself. Additionally think about a concept how this can be improved in the future. Take into consideration, that we are parsing many lists, with hunderts of campanies every day.
[Link to the script](https://github.com/samsoft00/klima-metrix-task/blob/master/src/lib/sanitizeData.ts)
## Part II
> The task above is only one step of processing the customers data. Build an API, which allows to upload a csv file containing the list of companies of a customer. The upload should trigger a step based procssing. Simulate 5 steps, which all should take 30 - 120 seconds and add your code from above as a 6. and last step. Aditonally allow the user (a Single Page Frontend Application, which is not part of this task) to check the progress. Store results + our company knowledge in a database.
```
npm run i
``````
Base URL : http://localhost:3000
Upload API : /v1/api/upload
Upload process status API : /v1/api/upload/:processId
```**To start server**
```
npm run start:local:dev
```**To start worker**
```
npm run start:local:worker
```Kindly start redis server for the worker to run.
[Download sample CSV file](https://github.com/samsoft00/klima-metrix-task/blob/master/doc/robots.csv)
| CSV upload response | Upload status response |
| :----------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------: |
|  |  |