I am thinking of a way to allow users to upload files containing app-data, which would be parsed on the server and subsequently loaded into the database with a method call. A side-effect of this approach would be that it should be possible to do the same on the server, but from the command line. However I am unsure as how to call a method from the command line…
//load the file, validate content, insert into database
If I would be able to call this method from the command line this would allow me to insert data with a simple command-line call, or allow users to upload their own data.
Cool, thanks! I have indeed implemented REST endpoints with nimble:restivus, which sort of works the way I want it to.
My main objective was to use the schema validations I have set up within meteor when bulk-loading data into my app. For this I am now using a node.js script that makes http calls to my apps REST endpoints. This seems ineffective to me. Additionally, I found it hard to only expose the REST api on the server, so that it can not be called from the outside world.
Do you know of any examples that set up a DDP connection from a separate node.js script? A bit like I am doing right now with HTTP requests?