 
 module.exports = (params = {}) ->
   config =
-    mongoDbs:         if params.mongoDbs?    then params.mongoDbs    else null
-    postgresDbs:      if params.postgresDbs? then params.postgresDbs else null
+    mongoDbs:               if params.mongoDbs?           then params.mongoDbs                  else null
+    postgresDbs:            if params.postgresDbs?        then params.postgresDbs               else null
+    elasticsearchClts:      if params.elasticsearchClts?  then params.params.elasticsearchClts  else null
 
   app = express()
   secondes = 0

          if promises[i] == 'mongo'
            databases = mongo
            j = 1
          else
            if result.isFulfilled()
              databases['database_' + j] = true
            else
              databases['database_' + j] = false
          i++
          j++

        answer['postgres'] = postgres
        answer['mongo'] = mongo
        res.send(answer)
    else
      res.send(answer)

              return fulfill result
      )

  pingAsync = (elasticsearchClt) ->
    new Promise((fulfill,reject) ->
      elasticsearchClt.ping {
        requestTimeout: 3000
        hello: 'elasticsearch!'
        }, (err) ->
          if err
            return reject err
          else
            return fulfill true
    )

  app.get "/healthcheck", (req, res, next) ->
    answer = {}
    answer['uptime'] = secondes
    promises = []

    #Check postgresDbs connections
    if config.postgresDbs
      postgresDbs = config.postgresDbs()
      for postgresDb in postgresDbs
