diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ruuter/core.clj | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/ruuter/core.clj b/src/ruuter/core.clj index e646f7e..db079c2 100644 --- a/src/ruuter/core.clj +++ b/src/ruuter/core.clj @@ -4,24 +4,6 @@ (:gen-class)) -(def routes [{:path "/" - :method :get - :response {:status 200 - :body "Hello, World."}} - {:path "/some/page/goes/here" - :method :get - :response {:status 200 - :body ":)"}} - {:path "/hi/:name" - :method :get - :response (fn [req] - {:status 200 - :body (str "Hi, " (:name (:params req)))})} - {:path :not-found - :response {:status 404 - :body "Not found."}}]) - - (defn- path->regex-path [path] (if (= "/" path) @@ -91,8 +73,4 @@ ([routes] (route! routes {:port 9600})) ([routes opts] - (http/run-server #(router routes %) opts))) - - -(defn -main [& opts] - (route! routes))
\ No newline at end of file + (http/run-server #(router routes %) opts)))
\ No newline at end of file |
