module.exports = function (mongoose) {
  'use strict';
  var db,
    config = {
      'USER': process.env.USER,
      'PASS': process.env.PASS,
      'HOST': process.env.HOST,
      'PORT': process.env.PORT,
      'DATABASE': 'test'
    },
    dbPath = ['mongodb://', config.USER, ':',
              config.PASS, '@', config.HOST,
              ':', config.PORT, '/',
              config.DATABASE].join(''),
    greets = 'Welcome to ionic app db';

    var GreetingSchema = mongoose.Schema({
      sentence: String
    });
    var Greeting = mongoose.model('GreetingSchema', GreetingSchema);

    mongoose.connect(dbPath);

    db = mongoose.connection;

    db.once('open', function(){
      var greeting;
      Greeting.find(function(err, greetings) {
        console.log('inside greetings');
        if(!greetings) {
          greeting = new Greeting({ sentence: greets });
          greeting.save();
        }
      }, function(err) {
           console.log(err);
      });
    });
};

@@ -223,14 +223,22 @@
 E': 
-'test'
+process.env.DB
 %0A   

add db to process env