From ec8eaf68190b2988f433d2fd099080f044ff81c6 Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Sat, 2 Oct 2021 01:58:09 -0300 Subject: Clean up --- src/ruuter/core.clj | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/ruuter/core.clj') 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 -- cgit v1.2.3