This API allow to push a csv file into MySQL database using csv_to_sql
script and then data can be retreived from the database as needed from the api
which have some predefined routes.
Before running the script, make sure you have the following installed:
- Node.js: Download and install Node.js if you haven't already.
- MySQL: Install MySQL and set up your database server.
-
Clone this repository or download the script files to your local machine.
-
Go to desired directory for csv_to_sql:
cd .\csv_to_sql
and to hit api endpoints
cd .\api
-
Install the required dependencies in package.json
-
Follow README of specific directory.
-
Run the script using the following command:
node .\index.js
In order to enhance the performance and improve the response time of the API, future work involve implementing Redis as a caching layer. Redis is an in-memory data store that can significantly speed up data retrieval compared to traditional MySQL database queries. By leveraging Redis, we can reduce the load on the MySQL database and provide faster access to frequently requested data.