File tree Expand file tree Collapse file tree 3 files changed +1
-19
lines changed
compiled_starters/clojure/src/http_server Expand file tree Collapse file tree 3 files changed +1
-19
lines changed Original file line number Diff line number Diff line change 77
88(def port 4221 )
99
10- (alter-var-root #'*out* (constantly *err*))
11-
1210(defn serve []
1311 (let [server-sock (ServerSocket. port)]
1412 (.setReuseAddress server-sock true )
2018 ; ; You can use print statements as follows for debugging, they'll be visible when running tests.
2119 (println " Logs from your program will appear here!" )
2220
23-
24- (alter-var-root #'*out* (constantly (java.io.PrintWriter. System/out true )))
25-
26-
2721 ; ; Uncomment this block to pass the first stage
2822 ; ;(serve)
2923
Original file line number Diff line number Diff line change 77
88(def port 4221 )
99
10- (alter-var-root #'*out* (constantly *err*))
11-
1210(defn serve []
1311 (let [server-sock (ServerSocket. port)]
1412 (.setReuseAddress server-sock true )
1715 (println " accepted new connection" ))))
1816
1917(defn -main [& args]
20-
21- (alter-var-root #'*out* (constantly (java.io.PrintWriter. System/out true )))
22-
23-
2418 (serve )
2519
2620 )
Original file line number Diff line number Diff line change 1- @@ -1,30 +1,26 @@
1+ @@ -1,24 +1,20 @@
22 (ns http-server.core
33 (:require
44 [clojure.java.io :as io])
88
99 (def port 4221)
1010
11- (alter-var-root #'*out* (constantly *err*))
12-
1311 (defn serve []
1412 (let [server-sock (ServerSocket. port)]
1513 (.setReuseAddress server-sock true)
2119- ;; You can use print statements as follows for debugging, they'll be visible when running tests.
2220- (println "Logs from your program will appear here!")
2321-
24-
25- (alter-var-root #'*out* (constantly (java.io.PrintWriter. System/out true)))
26-
27-
2822- ;; Uncomment this block to pass the first stage
2923- ;;(serve)
3024+ (serve)
You can’t perform that action at this time.
0 commit comments