Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1 from n1k0/patch-1

Added syntactic coloration to README
  • Loading branch information...
commit 0e70400df8fb3682b48c66298c62756286207ef0 2 parents e36a821 + ae74cea
@videlalvaro authored
Showing with 23 additions and 19 deletions.
  1. +23 −19 README.md
View
42 README.md
@@ -12,32 +12,36 @@ With leiningen add it to your project dependencies like this:
And with Maven you can do:
- <dependency>
- <groupId>claude</groupId>
- <artifactId>claude</artifactId>
- <version>0.1.0-SNAPSHOT</version>
- </dependency>
+```xml
+<dependency>
+ <groupId>claude</groupId>
+ <artifactId>claude</artifactId>
+ <version>0.1.0-SNAPSHOT</version>
+</dependency>
+```
Then on your code you can use it this way:
- (ns my.namespace
- (use: [claude.core :as cf]
- [langohr.core :as lhc]
- [monger.core :as mg]))
+```clojure
+(ns my.namespace
+ (use: [claude.core :as cf]
+ [langohr.core :as lhc]
+ [monger.core :as mg]))
- (defonce default-url "mongodb://127.0.0.1/mydb)
+(defonce default-url "mongodb://127.0.0.1/mydb)
- (defn mongo-connect []
- (if (cf/cloudfoundry?)
- (mg/connect-via-uri! (cf/mongo-url))
- (mg/connect-via-uri! default-url)))
+(defn mongo-connect []
+ (if (cf/cloudfoundry?)
+ (mg/connect-via-uri! (cf/mongo-url))
+ (mg/connect-via-uri! default-url)))
- (defn rabbitmq-connect []
- (if (cf/cloudfoundry?)
- (lhc/connect (lhc/settings-from (cf/rabbit-url)))
- (lhc/connect)))
+(defn rabbitmq-connect []
+ (if (cf/cloudfoundry?)
+ (lhc/connect (lhc/settings-from (cf/rabbit-url)))
+ (lhc/connect)))
- (defonce ^Connection conn (rabbitmq-connect))
+(defonce ^Connection conn (rabbitmq-connect))
+```
## TODO
Please sign in to comment.
Something went wrong with that request. Please try again.