Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Testing MongoDB

  • Loading branch information...
commit 43e60012c1a32f774b7c5bb84fcb740dd6b24ca7 1 parent e0e3c36
@zolrath authored
Showing with 20 additions and 5 deletions.
  1. +20 −5 src/andrew_site/views/content.clj
View
25 src/andrew_site/views/content.clj
@@ -5,8 +5,23 @@
somnium.congomongo
[somnium.congomongo.config :only [*mongo-config*]]))
-(mongo! :db "mydb")
+(mongo! :db "app1002329" :host "staff.mongohq.com" :port 10001)
+(authenticate :user "heroku" :pass "4df8f6a5a6484618f44d7359d0d9f2bf")
+(def major-skills
+ (map #(:skill %) (fetch :skills :where {:level "major"})))
+
+(def lesser-skills
+ (map #(:skill %) (fetch :skills :where {:level "lesser"})))
+
+(def add-major-skill [skill]
+ (insert! :skills {:skill skill :level "major"}))
+
+(def add-lesser-skill [skill]
+ (insert! :skills {:skill skill :level "lesser"}))
+
+(def add-job [name start-year end-year url description]
+ (insert! :jobs {:name name :start-year start-year :end-year :url url :description description}))
(defn split-mongo-url [url]
"Parses mongodb url from heroku, eg. mongodb://user:pass@localhost:1234/db"
@@ -33,11 +48,11 @@
(def header-name "Andrew Marrone")
-(def major-skills
- ["Shell Scripting" "Ubuntu" "CentOS" "OS X" "VMWare"])
+(comment (def major-skills
+ ["Shell Scripting" "Ubuntu" "CentOS" "OS X" "VMWare"]))
-(def lesser-skills
- ["ESXi" "Microsoft Exchange" "Windows Server 2003" "Active Directory"])
+(comment (def lesser-skills
+ ["ESXi" "Microsoft Exchange" "Windows Server 2003" "Active Directory"]))
(def profile
"Three years help desk experience while taking on more admin roles, regarded by peers and supervisors as a top-notch performer always eager to learn more.<br />
Please sign in to comment.
Something went wrong with that request. Please try again.