This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-10-26
Channels
- # 100-days-of-code (1)
- # aleph (4)
- # beginners (112)
- # boot (2)
- # business (4)
- # calva (3)
- # cider (37)
- # clara (26)
- # cljs-dev (6)
- # cljsrn (1)
- # clojars (4)
- # clojure (89)
- # clojure-brasil (1)
- # clojure-conj (1)
- # clojure-dev (81)
- # clojure-dusseldorf (8)
- # clojure-italy (41)
- # clojure-nl (3)
- # clojure-spec (11)
- # clojure-uk (14)
- # clojurescript (73)
- # cursive (1)
- # data-science (3)
- # datomic (2)
- # dirac (9)
- # duct (6)
- # emacs (4)
- # figwheel-main (1)
- # fulcro (47)
- # incanter (3)
- # jobs-discuss (43)
- # leiningen (18)
- # luminus (6)
- # lumo (4)
- # mount (4)
- # off-topic (31)
- # portkey (8)
- # protorepl (5)
- # re-frame (9)
- # reagent (15)
- # reitit (2)
- # ring-swagger (7)
- # shadow-cljs (28)
- # specter (4)
- # tools-deps (8)
- # uncomplicate (1)
Hi, I have a problem when using aleph as a http server: https://stackoverflow.com/questions/53004800/clojure-aleph-http-server-does-not-respond-body Can anyone here help me with this? Thanks!
@cmal Seems to work for me.
curl -v " "
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET / HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.61.1
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain
< Server: Aleph/0.4.4
< Connection: Keep-Alive
< Date: Fri, 26 Oct 2018 10:16:02 GMT
< content-length: 14
<
* Connection #0 to host localhost left intact
wallet backend
how have you configured the main?
i wrote this and it works
(ns myapp.core
(:require
[aleph.http :as http]
[compojure.core :as compojure :refer [GET POST]]
[ring.middleware.params :as params]))
(defn root-handler
[req]
{:status 200
:headers {"content-type" "text/plain"}
:body "wallet backend"})
(def http-handler
(params/wrap-params
(compojure/routes
(GET "/" [] root-handler))))
(defn -main
[]
(http/start-server http-handler {:port 8080}))