This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns linkedin-clojure.handler | |
(:use compojure.core) | |
(:require [compojure.handler :as handler] | |
[compojure.route :as route] | |
[hiccup.page :as hpage] | |
[hiccup.form :as form] | |
[cheshire.core :as parse] | |
[ring.util.response :as response] | |
[clj-http.client :as client])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Mongo mongo = new Mongo(hosts); | |
String mapFn = "function(){ var value = {"+ | |
"title: this.title,"+ | |
"author: this.author,"+ | |
"ISBN: this.ISBN,"+ | |
"description: this.description"+ | |
"};"+ | |
"emit({rating: this.rating, author: this.author.id}, value);"+ | |
"}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<label>Título: </label> | |
<input type="text" name="titulo" ng-model="question.title"> | |
<label>Respuestas: </label> | |
<ul ng-repeat="answer in answers" ng-model="answers"> | |
<li>{{answer.title}}</li> | |
</ul> | |
<input type="text" name="answer" ng-model="answer"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns project-name.handler | |
(:require [compojure.handler :as handler] | |
[compojure.route :as route] | |
[ring.middleware.params :as params] | |
[sandbar.stateful-session :as session] | |
[project-name.controllers.private :as private])) | |
(defn- stateful-route | |
"Calls the routeFn adding stateful session." | |
[routeFn] |
NewerOlder