This file contains hidden or 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 blog | |
(:use compojure.http.routes) | |
(:use compojure.http.servlet) | |
(:use compojure.server.jetty) | |
(:use compojure.html)) | |
(defn show-main-page [] | |
"Hello World!") | |
(defroutes main-routes |
This file contains hidden or 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 blog | |
(:use compojure.http.routes) | |
(:use compojure.http.servlet) | |
(:use compojure.server.jetty) | |
(:use compojure.html)) | |
(defn show-main-page [] | |
"Hello World!") | |
(defn page-not-found [] |
This file contains hidden or 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 compojureongae "0.1.0-SNAPSHOT" | |
:description "Example app for deployoing Compojure on Google App Engine" | |
:dependencies [[compojure "0.4.0-SNAPSHOT"] | |
[ring/ring-jetty-adapter "0.2.0"]] | |
:dev-dependencies [[leiningen/lein-swank "1.1.0"]]) |
This file contains hidden or 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 compojureongae.core | |
(:use compojure.core | |
ring.adapter.jetty) | |
(:require [compojure.route :as route])) | |
(defroutes example | |
(GET "/" [] "<h1>Hello World Wide Web!</h1>") | |
(route/not-found "Page not found")) | |
(run-jetty example {:port 8080}) |
This file contains hidden or 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 compojureongae.core | |
(:gen-class :extends javax.servlet.http.HttpServlet) | |
(:use compojure.core | |
ring.util.servlet) | |
(:require [compojure.route :as route])) | |
(defroutes example | |
(GET "/" [] "<h1>Hello World Wide Web!</h1>") | |
(route/not-found "Page not found")) |
This file contains hidden or 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 compojureongae "0.1.0" | |
:description "Example app for deployoing Compojure on Google App Engine" | |
:namespaces [compojureongae.core] | |
:dependencies [[compojure "0.4.0-SNAPSHOT"] | |
[ring/ring-servlet "0.2.1"]] | |
:dev-dependencies [[leiningen/lein-swank "1.2.0-SNAPSHOT"]] | |
:compile-path "war/WEB-INF/classes" | |
:library-path "war/WEB-INF/lib") |
This file contains hidden or 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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<web-app | |
xmlns="http://java.sun.com/xml/ns/javaee" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" | |
version="2.5"> | |
<display-name>Compojure on GAE</display-name> | |
<servlet> | |
<servlet-name>blog</servlet-name> |
This file contains hidden or 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
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> | |
<!-- Replace this with your application id from http://appengine.google.com --> | |
<application>compojureongae</application> | |
<version>v0-1</version> | |
</appengine-web-app> |
This file contains hidden or 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
lein clean && lein deps && lein compile # regular leiningen build | |
lein uberwar # create a war with all dependency (and dev-dependency) jars | |
rm -rf war && mkdir war | |
unzip compojureongae-0.1.0.war -d war # unpack the war | |
rm -r war/WEB-INF/lib/dev # remove the dev-dependencies |
This file contains hidden or 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
body { | |
font: 62.5% "Lucida Sans Unicode", "Lucida Grande", sans-serif; | |
padding: 10px 30px; | |
} | |
ol, ul, p { | |
font-size: 1.2em; | |
line-height: 1.5; | |
} | |
form, fieldset, legend { | |
border: 0; |
OlderNewer