How to deploy meteor app with .csv input file

I am trying to deploy a meteor app and the database is generated from .cvs file. Where should I put .cvs file and how can I access it?

I tried to put my book_list.csv under project_directory or project_directory/server, then to access it with “proprocess.env.PWD + ‘/[server/]book_list.csv’”. However, after “meteor deploy”, it kept failing:

[Wed Apr 22 2015 04:50:59 GMT+0000 (UTC)] WARNING Error: ENOENT, open ‘//server/book_list.csv’
[Wed Apr 22 2015 04:50:59 GMT+0000 (UTC)] WARNING throw er; // Unhandled ‘error’ event

Any suggestions?

Thanks in avdance,

Create a directory called private and put your file inside that.

Then use Assets.getText(“your filename.csv”)

1 Like

Thanks, it works! (along with harrison:babyparse) :smile: