Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chanchals7/noapp-assignment
noapp assignment - about uploading bulk data in api
https://github.com/chanchals7/noapp-assignment
env express mocha mongoose multer nodemon unit-testing
Last synced: 26 days ago
JSON representation
noapp assignment - about uploading bulk data in api
- Host: GitHub
- URL: https://github.com/chanchals7/noapp-assignment
- Owner: ChanchalS7
- Created: 2023-10-21T02:45:13.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-10-21T09:38:38.000Z (about 1 year ago)
- Last Synced: 2024-10-10T22:41:30.297Z (26 days ago)
- Topics: env, express, mocha, mongoose, multer, nodemon, unit-testing
- Language: JavaScript
- Homepage:
- Size: 49.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# noapp-assignment
# Bulk Data Upload APIThis Node.js application allows you to upload bulk data in CSV format and store it in a MongoDB database. It includes unit tests to validate the CSV upload and data storage functionality.
## Getting Started
Follow these steps to set up and run the application.
### Prerequisites
Make sure you have the following software installed on your machine:
- [Node.js](https://nodejs.org/)
- [MongoDB](https://www.mongodb.com/)### Installation
1. Clone this repository to your local machine:
```bash
git clone https://github.com/ChanchalS7/noapp-assignment.git
`````2. Install dependency :
```
npm install
```
### ConfigurationCreate a .env file in the project root directory to set environment variables. You can use the following template and adjust it as needed:
```
MONGODB_URL=mongodb://localhost:27017/bulk_data
PORT=8000
```### Start the Application
```
npm start
````### Running Tests
```
npm test```
### API Endpoints
POST /api/upload: Use this endpoint to upload CSV data. Attach the CSV file as a csvFile field in the request.
### Example CSV Files
You can find example CSV files in the test/fixtures directory:
````
valid.csv: Contains valid data.
invalid.csv: Contains invalid data.
````### Author
- [Chanchal Verma (LinkedIn)](https://www.linkedin.com/in/chanchals7/)
- [Chanchal Verma (GitHub)](https://github.com/ChanchalS7)