Starting adding samples.

This commit is contained in:
Oleksandr Petrov 2011-09-08 22:27:49 +02:00
parent 4124b033f6
commit b91214cf37
3 changed files with 26 additions and 1 deletions

View file

@ -6,6 +6,13 @@ Monger is an experimental idiomatic Clojure wrapper around MongoDB Java driver
TBD
## Samples
To run sample, install lein-exec (https://github.com/kumarshantanu/lein-exec) and execute:
lein exec examples/basic_operations.clj
## License
Copyright (C) 2011 Orceo GmbH

View file

@ -0,0 +1,16 @@
(ns examples.basic_operations
(:gen-class)
(:require [monger.core])
(:import (com.mongodb Mongo DB))
(:use [clojure.tools.cli]))
(do
(let
[ args *command-line-args*
parsed-args (cli args
(optional ["--port" "Mongodb port" :default 27017])
(optional ["--host" "Mongodb host" :default "localhost"])
(optional ["--db-name" :default "monger-example"])) ]
))

View file

@ -2,5 +2,7 @@
:description "Monger is an experimental idiomatic Clojure wrapper around MongoDB Java driver"
:license { :name "Eclipse Public License" }
:dependencies [[org.clojure/clojure "1.3.0-beta3"]
[org.mongodb/mongo-java-driver "2.6.5"]]
[org.mongodb/mongo-java-driver "2.6.5"]
[org.clojure/tools.cli "0.1.0"]
]
:warn-on-reflection true)