MongoDB supports bulk insert http://docs.mongodb.org/manual/core/bulk-inserts/
I have tried it in Meteor collection:
Orders.insert([
{ \"cust_id\
You could use exec (nodejs docs) to run a mongo script inside of meteor inside of a Meteor.startup on the server.
Example:
Meteor.startup(function () {
var exec = Npm.require('child_process').exec;
exec('mongo localhost:27017/meteor path-to/my-insert-script.js', function ( ) {
// done
});
});
Not optimum, but I think it's your best bet for now. You can also use the command line option --eval against Mongo in exec and pass the insert statement as a string to exec. That might look like this:
Meteor.startup(function () {
var exec = Npm.require('child_process').exec;
exec('mongo localhost:27017/meteor --eval \'db.Orders.insert(' + JSON.stringify(arrOfOrders) + ')\'', function ( ) {
// done
});
});