   OpenShift provided admin credentials for zero conf deployment."
   (str (System/getenv "OPENSHIFT_MONGODB_DB_URL") db-name))
 
+;-- Jelastic
+
+(defn is-jelastic? []
+  (= "jelastic" (str (System/getenv "environment"))))
+
+(defn jelastic-uri [uid pwd]
+  "Get Jelastic MongoDB URI. 'uid' and 'pwd' are ignored, defined in
+  jelastic environemnt configuration file."
+  (str (System/getenv "mongo_url")))
+
 ;-- Heroku
 
 (defn is-heroku? []

  autogenerated"
  (System/getenv "MONGOHQ_URL"))


(defn mongo-connection-uri [uid pwd]
  "Try to figure out runtime environment and resolve associated MongoDB
  connection URI. Defaults to localhost and standard port"
  (cond (is-dotcloud?) (dotcloud-uri uid pwd)
        (is-open-shift?) (open-shift-uri uid pwd)
        (is-heroku?) (heroku-uri uid pwd)
        :else (localhost-uri uid pwd)))

;;Roadmap:
;Jelastic
;AWS Beanstalk

(ns notes.paas
  (:require [clojure.java.io :as io]
            [clojure.data.json :as json]))

(def db-name "notes")

