This API performs various operations on a matrix contained in a CSV file uploaded by the user. Matrix Operations API
Requirements
Node.js (v12 or higher) npm (v6 or higher)
Clone the repository: git clone Installationhttps://github.com/your-username/matrix-operations-api.git Install dependencies: npm install
Start the server: npm start Send a POST request to the /echo endpoint with a CSV file attached and the desired operation in the op query parameter. Usage
```` curl -X POST Example Requesthttp://127.0.0.1:8080/echo\?op\=invert -H "Content-Type: multipart/form-data" -F file=@path/to/your/file.csv ````
Available Operations
invert
: Inverts the matrix.
flatten
: Flattens the matrix to a one-dimensional array.
sum
: Calculates the sum of all the elements in the matrix.
multiply
: Calculates the product of all the elements in the matrix.
echo
(default): Echoes the matrix back as a CSV string.
License This project is licensed under the MIT License. See the LICENSE file for details.