-
-
Save patrickod/e70edeba39652f663029 to your computer and use it in GitHub Desktop.
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
patrick@Xenarchos [02:05:10] [~/code/professms] [master *] | |
-> % lein clean ; lein with-profile dev ring uberjar | |
Compiling professms.handler | |
Mar 16, 2014 2:15:04 PM com.mchange.v2.log.MLog <clinit> | |
INFO: MLog clients using java 1.4+ standard logging. | |
Warning: specified :main without including it in :aot. | |
Implicit AOT of :main will be removed in Leiningen 3.0.0. | |
If you only need AOT for your uberjar, consider adding :aot :all into your | |
:uberjar profile instead. | |
Compiling professms.handler | |
Mar 16, 2014 2:15:21 PM com.mchange.v2.log.MLog <clinit> | |
INFO: MLog clients using java 1.4+ standard logging. | |
Created /Users/patrick/code/professms/target/dev+uberjar/professms-0.1.0-SNAPSHOT.jar | |
Created /Users/patrick/code/professms/target/dev/professms-0.1.0-SNAPSHOT-standalone.jar | |
patrick@Xenarchos [02:15:33] [~/code/professms] [master *] | |
-> % |
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
patrick@Xenarchos [02:03:53] [~/code/professms] [master *] | |
-> % java -jar /Users/patrick/code/professms/target/dev/professms-0.1.0-SNAPSHOT-standalone.jar | |
Exception in thread "main" java.lang.NoClassDefFoundError: professms/handler/main | |
Caused by: java.lang.ClassNotFoundException: professms.handler.main | |
at java.net.URLClassLoader$1.run(URLClassLoader.java:202) | |
at java.security.AccessController.doPrivileged(Native Method) | |
at java.net.URLClassLoader.findClass(URLClassLoader.java:190) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:306) | |
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) | |
at java.lang.ClassLoader.loadClass(ClassLoader.java:247) | |
patrick@Xenarchos [02:04:41] [~/code/professms] [master *] |
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 professms.handler | |
(:gen-class) | |
(:use compojure.core) | |
(:require [compojure.handler :as handler] | |
[compojure.route :as route] | |
[ring.adapter.jetty :as jetty] | |
[environ.core :as environ] | |
[professms.routes.twilio :as twilio])) | |
(defroutes app-routes | |
twilio/routes | |
(route/not-found "Not found")) | |
(def app | |
(handler/site app-routes)) | |
(defn start-server [port] | |
(jetty/run-jetty #'app {:port port})) | |
(defn -main [& [port]] | |
(let [port (Integer. (or port (environ/env :port) 5000))] | |
(start-server port))) |
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
(defproject professms "0.1.0-SNAPSHOT" | |
:description "A web service for sharing secrets with strangers over SMS" | |
:url "http://professms.patrickod.com" | |
:license {:name "MIT" | |
:url "http://en.wikipedia.org/wiki/MIT_License"} | |
:dependencies [ | |
[compojure "1.1.6"] | |
[org.clojure/clojure "1.5.1"] | |
[clj-twiml "0.1.4"] | |
[korma "0.3.0-RC6"] | |
[org.clojure/java.jdbc "0.2.3"] | |
[postgresql "9.1-901.jdbc4"] | |
[com.novemberain/validateur "1.5.0"] | |
[environ "0.4.0"] | |
[ring "1.2.2"] | |
[org.clojars.echo/test.mock "0.1.2"] | |
[ring/ring-jetty-adapter "1.2.2"] | |
[clj-http "0.9.0"] | |
] | |
:plugins [ | |
[lein-environ "0.4.0"] | |
[lein-pprint "1.1.1"] | |
[lein-ring "0.8.10"] | |
] | |
:main professms.handler | |
:aot [professms.handler] | |
:ring {:handler professms.handler/app} | |
:target-path "target/%s" | |
:aliases {"migrate" ["run" "-m" "professms.db.migrate"]} | |
:profiles { | |
:test { | |
:env { | |
:twilio-sid "SECRET" | |
:twilio-auth-token "SECRET" | |
:twilio-number "+15005550006" | |
:db-url "postgres://professms:@127.0.0.1:5432/professms_test" | |
} | |
:dependencies [[ring-mock "0.1.5"] ] | |
} | |
:dev { | |
:env { | |
:twilio-sid "SECRET" | |
:twilio-auth-token "SECRET" | |
:twilio-number "+15005550006" | |
:db-url "postgres://professms:@127.0.0.1:5432/professms_development" | |
} | |
} | |
:production { | |
:env { | |
:twilio-sid "SECRET" | |
:twilio-auth-token "SECRET" | |
:twilio-number "+15005550006" | |
:db-url "postgres://professms:@127.0.0.1:5432/professms_development" | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment