This is a simple Node.js application that converts CSV files to JSON format.
Before running the application, ensure you have PostgreSQL and node.js set up on your system. You'll need to configure the following environment variables:
-
Clone the repository:
git clone https://github.com/SinghAnuj29/csv-to-json-converter.git
-
Install dependencies: npm install
- Create a .env file in the root directory of the project and add the following environment variables:
CSV_FILE_PATH=/path/to/csv/file.csv
DB_USER=my_database_user
DB_HOST=localhost
DB_NAME=my_database_name
DB_PASSWORD=my_database_password
DB_PORT=5432
Make sure to replace the placeholders (/path/to/csv/file.csv, my_database_user, etc.) with your actual file path and database configuration details.
-
Start the server:
npm start -
To convert a CSV file to JSON, send a GET request to the /parse endpoint.
- Technologies Used
Node.js
Express.js