Skip to content

Commit

Permalink
added a route
Browse files Browse the repository at this point in the history
  • Loading branch information
devn committed Jan 8, 2010
1 parent a75ffaf commit 222a884
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/cljex/core.clj
Expand Up @@ -26,7 +26,7 @@
[ns]
(vals (ns-publics ns)))

(defmacro discover-namespace-m [ns] `(discover-namespace '~ns))
(defmacro discover-namespace* [ns] `(discover-namespace '~ns))

;==============================
; Format/Output Documentation
Expand Down Expand Up @@ -136,7 +136,8 @@
(GET "/docs/:name" (doc-page (:name params))))

(defroutes static-routes
(GET "/*" (serve-file *public-dir* (params :*))))
(GET "/*" (serve-file *public-dir* (params :*)))
(GET "/doc-index") (gen-doc-index-inline))

(defroutes error-routes
(ANY "/*" [404 "404 Page Not Found"]))
Expand All @@ -147,11 +148,11 @@
error-routes)

;==============================
; Start Your Engines
; Start Your REPL Engine
;==============================
;; (run-server
;; {:port 8080}
;; "/*" (servlet all-routes))
(run-server
{:port 8080}
"/*" (servlet all-routes))

;==============================
; Main
Expand Down
6 changes: 6 additions & 0 deletions start-server.sh
@@ -0,0 +1,6 @@
#!/bin/sh

java -jar cljex.jar
java -jar cljex.jar --server

#END

0 comments on commit 222a884

Please sign in to comment.