Skip to content

Instantly share code, notes, and snippets.

@xpe xpe/project.clj
Created Mar 29, 2014

Embed
What would you like to do?
Example project.clj for Clojure web app using Pedestal and Datomic
(defproject myapp-service "0.0.2-SNAPSHOT"
:description "A web app"
:url "http://myapp.domain.com"
:dependencies
[[org.clojure/clojure "1.6.0"]
[org.clojure/tools.reader "0.8.3"]
[com.datomic/datomic-pro "0.9.4699"
:exclusions [org.slf4j/slf4j-api org.slf4j/slf4j-nop commons-codec]]
[io.pedestal/pedestal.service "0.2.2"
:exclusions [com.fasterxml.jackson.core/jackson-core]]
[io.pedestal/pedestal.service-tools "0.2.2"
:exclusions [com.fasterxml.jackson.core/jackson-core]]
[enlive/enlive "1.1.5"]
[validata "0.1.5"]]
:repositories
{"my.datomic.com"
{:url "https://my.datomic.com/repo"
:username "email@domain.com"
:password "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"}}
:profiles
{:dev
{:source-paths ["dev"]
:dependencies
[[io.pedestal/pedestal.jetty "0.2.2"]]}}
:min-lein-version "2.0.0"
:resource-paths ["config", "resources"]
:aliases
{"run-dev" ["trampoline" "run" "-m" "myapp-service.server/run-dev"]}
:repl-options
{:init-ns user
:init
(try
(use 'io.pedestal.service-tools.dev)
(require 'myapp-service.service)
; HACK: Allow referencing non clojure.core symbols in :init
(eval '(init myapp-service.service/service
#'myapp-service.service/routes))
(catch Throwable t
(println "ERROR: There was a problem loading"
"io.pedestal.service-tools.dev")
(clojure.stacktrace/print-stack-trace t)
(println)))
:welcome (println
"Welcome to pedestal-service!"
"Run (tools-help) to see a list of useful functions.")}
:main ^{:skip-aot true} myapp-service.server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.