Thursday 16 November 2017

Nodejs, CSV and Cron?

I'm trying to write a node app that will read a csv file and update each row at a setinterval to a mongo database.For Example, I have a csv file with 2000 rows and I’d like each row to be updated to my db once a day.I followed this tutorial to upload a csv file to my mongodb database: http://ift.tt/2z9KVTj but all that does is update my DB with all the files that I upload and it displays immediately on my page.My goal is to have each author on the csv displayed once per day until there are no more authors.What is the best practice to have the csv file read row by row to update my collection? Or rather, display a document at a set interval?Ultimately I would like to utilize my raspberry pi to have this run automatically.Sorry if this such question has been asked before or if this is the wrong subreddit, I'm rather new to development. I've read up on cron jobs and crontabs and looked at a few videos regarding this, but beyond that, I’m kind of lost and any help would be appreciated.

Submitted November 17, 2017 at 04:15AM by BroXplode

No comments:

Post a Comment