compojure

    8熱度

    2回答

    Compojure不綁定POST表單中的字段。這是我的路線DEF: (defroutes main-routes (POST "/query" {params :params} (debug (str "|" params "|")) "OK...") ) 當我張貼在其領域的一種形式,我得到| {} |,即沒有參數。順便說一下,當我去http://localho

    4熱度

    1回答

    我有一個小的Compojure網站,與路線定義爲這樣: (defroutes example (GET "/" [] {:status 200 :headers {"Content-Type" "text/html"} :body (home)}) (GET "/*" (or (serve-file (params :*)) :next))

    0熱度

    1回答

    我已經編寫了一個內部webapp,用於將我們的jobcard數據庫中的發票導入到MYOB中。我用Clojure和Compojure編寫了它,它實際上工作得很好,對我來說這也是一個很好的學習練習。 但是,我有一個問題,似乎成功的發票導入後,碼頭服務器將不再提供靜態CSS文件。 的defroute如下:(該文件只是CSS/default.css,它工作得很好首次進口之前) (defroutes sta

    6熱度

    1回答

    我有這個project.clj一個簡單的Web應用程序: (defproject squirrel-money "1.0.0-SNAPSHOT" :description "Squirrel Money" :dependencies [[org.clojure/clojure "1.2.0"] [org.clojure/clojure-contrib "1.2.

    4熱度

    2回答

    我正在使用Compojure Web應用程序框架和Maven編寫一個使用Clojure編寫的簡單Web應用程序。 這是我的servlet的簡化版本: (ns core (:use compojure.core ring.util.servlet) (:require [compojure.route :as route]) (:gen-class :extends j

    4熱度

    2回答

    我有以下途徑定義: (require '[compojure.core :as ccore] '[ring.util.response :as response]) (def *main-routes* (ccore/defroutes avalanche-routes (ccore/GET "/" [] "Hello World 2") (cco

    5熱度

    1回答

    我曾經是能夠開始像這樣的Compojure Web服務器: (run-server {:port 8080} "/*" (servlet my-app)) 有誰知道這個功能在最新的Compojure已經? (0.6.2) 文檔說我應該從命令行運行它,並使用一些奇怪的自動重新加載的東西,在這一點上,我可能會使用Python。

    1熱度

    1回答

    繼http://en.wikibooks.org/wiki/Compojure/Getting_Started的指示,我: 下載http://github.com/weavejester/compojure/tarball/0.3.2 提取到〜/的Compojure CHDIR那裏 改變權限爲可執行 運行Ant DEPS ant run expor牛逼CLASSPATH =〜/的Compojure

    6熱度

    2回答

    我以爲我會發布這個,因爲我沒有真正理解發生的事情,通過猜測工作,我認爲如果有人解釋它可能會有幫助。 我知道如何在的元素得到: (GET "/something" [some_arg] "this is the response body") 或 (GET "/something" {{some_arg "some_arg"} :params} "this is the response bod

    1熱度

    2回答

    這是我如何定義我的應用程序: (defroutes index (GET "/" [] (main-page)) (GET "/form" [] (render-page "Vote" (render-form))) (POST "/vote" {params :params} (post-vote params)) (route/not-found "Pa