Demo - Large dataset collection JSON data to CSV export and download attachment..
Prerequisites: You must have following installed on your machine..
- NodeJS and npm (https://nodejs.org/)
- Bower (http://bower.io/#install-bower)
Run the following command:
$ bower install && npm install
First cd
into project root directory:
$ cd <path/to/your/project/>
After then, run this command to serve locally:
$ node app.js
after this open http://localhost:5000/
in your browser's tab.
That's all you need.. Enjoy.
For now, I have used streams with csvwriter which results bit slow downloading when we have very very lage dataset.. We have to update it to use mongoose-to-csv api which export all collection to direct csv and in result we will have good performance (fast download).
Cheers!
Narain Sagar
Website | Twitter | LinkedIn | Facebook | Github | Stack Overflow