Prepare for development

This commit is contained in:
Felisp 2023-12-21 03:00:12 +01:00
parent 06419e22b4
commit d5eded5a67

View file

@ -1,10 +1,29 @@
(ns rss-thread-watch.core
(:gen-class)
(:require ))
(:require [ring.adapter.jetty :as jetty])
(:gen-class))
;; Internal default config
(def CONFIG
"Internal default config"
{:target "https://api.4chan.org/mlp/catalog.json" ;Where to download catalog from
:start-index-at 50.0 ;We will search all threads that are lower in catalog than this % value
:refresh-delay (* 60 5) ;Redownload catalog every 5 mins
:port 6969 ;Liston on 6969
})
(defn -main
"Entry point, starts webserver"
[& args]
()
())
(defn handler [rqst]
{:status 404
:header {"Content-Type" "text/html"}
:body "No poines here ^:("})
;; Docs: https://github.com/ring-clojure/ring/wiki/Getting-Started
(defn repl-main
[]
(jetty/run-jetty handler {:port (:port CONFIG)
;; Dont block REPL thread
:join? false}))