Last active
May 16, 2017 18:28
-
-
Save mikepaszkiewicz/b172879773caaa9ee9f4ca8c512694f9 to your computer and use it in GitHub Desktop.
Import CSV Module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Packages needed | |
- (json-2-csv)[https://www.npmjs.com/package/json-2-csv] | |
- (ddp)[https://www.npmjs.com/package/ddp] | |
1. Run command takes 3 arguments: | |
- Filename of CSV to read | |
- Meteor collection name | |
- DDP URL String (localhost:3001/meteor most likely...) | |
2. Read CSV from file system | |
3. Convert into JSON format (output err/success message) | |
4. Connect to local database (output err/success message) | |
5. DDP.call method that inserts Prospect into database | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment