title: How to seed data for a node+mongo app deployed to Heroku?
body: <p>I have a node express app with MongoDB as database. I want to have a seed.js file which I can run to fill in initial data to the database. I have no problem doing this on my local maschine. I just write the mongo commands in my seed.js file and run it with:</p>
  
  <pre><code>$ mongo localhost:27017/myApp seed.js
  </code></pre>
  
  <p>However when I deploy my app to Heroku including MongoLab I am not sure how to seed the data there. Google leads me to rails stuff most of the time. </p>
  
  <p>So is there a simple way of <strong>seeding data for Heroku MongoLab</strong> without writing a script?</p>
  
  <p>Update:
  If I try to run it with the MONGOLAB_URI from heroku I get an error.</p>
  
  <pre><code>$ mongo mongodb://heroku_xxxx:xxxxx.mongolab.com:xxx/heroku_xxxx seed.js 
  
  MongoDB shell version: 3.0.5
  connecting to: mongodb://heroku_xxxxxxxx
  2015-08-19T21:44:22.694+0100 E QUERY    Error: More than one ':' detected. If this is an ipv6 address, it needs to be surrounded by '[' and ']'; heroku_xxxxxxxxxxxxx
      at connect (src/mongo/shell/mongo.js:181:14)
      at (connect):1:6 at src/mongo/shell/mongo.js:181
  exception: connect failed
  </code></pre>