<commit_before>(ns main
  (:use compojure.core cascade cascade.asset ring.adapter.jetty)
  (:require
    [cascade.request :as cr]
    [compojure.route :as route]
    [compojure.handler :as handler]))

(set! *warn-on-reflection* true)

(defview hello-world [request]
  :html
  [:head [:title ["Cascade Hello World"]
          (stylesheet (file-asset "css/bootstrap.css"))
          (stylesheet (classpath-asset "cascade/cascade.css"))]
   :body [
    :h1 ["Hello World"]
    :p [
      "The page rendered at "
      :em [(str (java.util.Date.))]
      "."
      ]
    :p [
      :a {:href "/hello"} ["click to refresh"]
      ]
    ]])

(defroutes main-routes
  ; Temporary: eventually we'll pass a couple of routes
  ;; into cr/initialize
  (GET "/hello" [] (cr/wrap-html hello-world))
  ; Executes with src/test as the current directory
  (cr/initialize "1.0" :public-folder "webapp")
  (route/not-found "Cascade Demo: No such resource"))

(def app
  (handler/site main-routes))

(run-jetty app {:port 8080})<commit_msg>Adjust main test application to execute from the project directory, not from src/test<commit_after>(ns main
  (:use compojure.core cascade cascade.asset ring.adapter.jetty)
  (:require
    [cascade.request :as cr]
    [compojure.route :as route]
    [compojure.handler :as handler]))

(set! *warn-on-reflection* true)

(defview hello-world [request]
  :html
  [:head [:title ["Cascade Hello World"]
          (stylesheet (file-asset "css/bootstrap.css"))
          (stylesheet (classpath-asset "cascade/cascade.css"))]
   :body [
    :h1 ["Hello World"]
    :p [
      "The page rendered at "
      :em [(str (java.util.Date.))]
      "."
      ]
    :p [
      :a {:href "/hello"} ["click to refresh"]
      ]
    ]])

(defroutes main-routes
  ; Temporary: eventually we'll pass a couple of routes
  ;; into cr/initialize
  (GET "/hello" [] (cr/wrap-html hello-world))
  (cr/initialize "1.0" :public-folder "src/test/webapp")
  (route/not-found "Cascade Demo: No such resource"))

(def app
  (handler/site main-routes))

(run-jetty app {:port 8080})
{'fraction_non_alphanumeric': 0.15548044422984067, 'fraction_numerical': 0.006760019314340898, 'mean_word_length': 3.007736943907157, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2082916', 'n_tokens_mistral': 739, 'n_tokens_neox': 704, 'n_words': 194}