text: /**
   * Populate DB with sample data on server start
   * to disable, edit config/environment/index.js, and set `seedDB: false`
   */
  
  'use strict';
  
  var Thing = require('../api/thing/thing.model');
  var User = require('../api/user/user.model');
  var Pin = require('../api/pin/pin.model');
  
  Thing.find({}).remove(function() {
    Thing.create({
      name : 'Development Tools',
      info : 'Integration with popular tools such as Bower, Grunt, Karma, Mocha, JSHint, Node Inspector, Livereload, Protractor, Jade, Stylus, Sass, CoffeeScript, and Less.'
    }, {
      name : 'Server and Client integration',
      info : 'Built with a powerful and fun stack: MongoDB, Express, AngularJS, and Node.'
    }, {
      name : 'Smart Build System',
      info : 'Build system ignores `spec` files, allowing you to keep tests alongside code. Automatic injection of scripts and styles into your index.html'
    },  {
      name : 'Modular Structure',
      info : 'Best practice client and server structures allow for more code reusability and maximum scalability'
    },  {
      name : 'Optimized Build',
      info : 'Build process packs up your templates as a single JavaScript payload, minifies your scripts/css/images, and rewrites asset names for caching.'
    },{
      name : 'Deployment Ready',
      info : 'Easily deploy your app to Heroku or Openshift with the heroku and openshift subgenerators'
    });
  });
  
  User.find({}).remove(function() {
    User.create({
      provider: 'local',
      name: 'Test User',
      email: 'test@test.com',
      password: 'test'
    }, {
      provider: 'local',
      role: 'admin',
      name: 'Admin',
      email: 'admin@admin.com',
      password: 'admin'
    }, function() {
        console.log('finished populating users');
      }
    );
  });
  
  // Seed pins
      Pin.find({}).remove(function() {
        Pin.create({
          name: 'Eteläsatama',
          info: 'The largest port in Helsinki.',
          activity: 'entertainment',
          location: {
            type: 'Point',
            coordinates: [24.958802635582064,60.16075728592842]
          }
        }, {
          name: 'Esplanadi',
          info: 'A small park in the very heart of Helsinki.',
          activity: 'food & drink',
          location: {
            type: 'Point',
            coordinates: [24.947586635582063,60.16759576206797]
          }
        }, function(err) {
          if (err) {
            console.log(err, 'finished populating pins');
  
          };
            console.log('finished populating pins');
         
          }
        );
      });