diff options
| author | Asko Nõmm <asko@bien.ee> | 2021-10-02 01:58:09 -0300 |
|---|---|---|
| committer | Asko Nõmm <asko@bien.ee> | 2021-10-02 01:58:09 -0300 |
| commit | ec8eaf68190b2988f433d2fd099080f044ff81c6 (patch) | |
| tree | 19781e904dca91f7f711f2ae418e37731cbae209 | |
| parent | 1ede2c6cb9bc96d56ed3d80fd46c35edc3fc2a0a (diff) | |
Clean up
| -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 |
