This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-10-25
Channels
- # aws (1)
- # beginners (6)
- # boot (403)
- # boulder-clojurians (1)
- # clojure (28)
- # clojure-china (1)
- # clojure-ecuador (2)
- # clojure-ukraine (2)
- # clojurescript (27)
- # clojurex (5)
- # core-async (7)
- # cursive (5)
- # datomic (4)
- # hoplon (160)
- # ldnclj (2)
- # ldnproclodo (2)
- # lein-figwheel (2)
- # om (182)
- # onyx (1)
- # re-frame (1)
- # reagent (40)
- # spacemacs (15)
hey, can we get a gitignore on .nrepl-history?
not sure what repo that should go against
a file called .nrepl-history is showing up in git as unstaged
looks like something that should be ignored
yeah i can
i’m suggesting that one is shipped with the project
the one that gets auto generated
in fact there is one
`/.boot/ /.nrepl-port /.repl-history /.lein-* /target /classes /checkouts `
/.boot/
/.nrepl-port
/.repl-history
/.lein-*
/target
/classes
/checkouts
and it doesn’t contain .nrepl-history
ok, so, say i write a little re-usable component element thing with hoplon in a hl file
what might be a good way to test it?
ah cool, i’ll have a look
thanks
@micha: hey, i’m noobing out with your heroku deployment example
is there a different heroku example?
i’m just wondering what :main-class is supposed to be
oh sure
let me google what that means 😛
so, originally i ran
lein new hoplon-castra my-project-name
but i did not get a project.clj file
is that right?
but heroku rejects my pushes because of the missing project.clj file
is this what you’re talking about?
hmm, ok
taking a step back
i run boot prod
i don’t get any .jar
is that right?
hmm, getting further along
the buildpack did something...
any idea what
desc="No web processes running
means for heroku?
nm, think i found it
Error: Could not find or load main class clojure.main
man...
i sort of got it working with
(serve …) (hoplon) (reload) (cljs) (wait)
but (cljs :optimizations :advanced)
seemed to freak out the free dyno on heroku because of memory
trying to get it working with a war
file
anyone know what Set the 'serve' callback function to SYM.
means for boot web
?
@alandipert: i have a suggestion for https://github.com/hoplon/hoplon/wiki/Get-Started
actually show how to get something deployed somewhere
"A deftask form that creates a prod task. We would use this to compile the project for deployment."
that has not really helped me so far
it would be great to show a basic deployment to a free service like heroku for the demo app
can anyone tell me what i’m supposed to set serve
as in boot web
in the hoplon/castra template to get a war
file working?
ok, a different question...
if i do
(serve …)
(hoplon)
(cljs)
(wait)
i get a page
if i do
(hoplon)
(cljs)
in one boot task
(serve …)
(wait)
in a different one just afterwards
i get a response from the server, but it’s a WSOD
what’s going on there?
@thedavidmeister: are you serving from filesystem or classpath?
(serve :dir "./target" :port 3000 :handler 'my-app.handler/app)
is what i’m trying
so i guess the filesystem?
not sure how to tell
@thedavidmeister: it’s generally easier in my experience to just serve from classpath, I think that would be just (serve :port ….)
so drop the :dir
?
@martinklepsch: the problem is i get this
Oct 25 07:07:37 estimate-work app/web.1: [mCompiling ClojureScript...
Oct 25 07:07:37 estimate-work app/web.1: [mAdding :require adzerk.boot-reload to index.html.cljs.edn...
Oct 25 07:07:37 estimate-work app/web.1: [m• index.html.js
Oct 25 07:07:40 estimate-work heroku/web.1: Process running mem=512M(100.1%)
Oct 25 07:07:40 estimate-work heroku/web.1: Error R14 (Memory quota exceeded)
I assume it’s the compiling using all that memory
and that a minimum hoplon/castra setup does not consume over 500mb
so I’m trying to get all the compiling done either when I push to heroku or on my local
and then just serve from heroku
Are you setting appropriate JVM options so that used memory does not surpass heroku’s limits?
i assume not
i just did this:
web: boot heroku-serve -p $PORT
(deftask heroku-serve
[p port PORT int "The port to serve on"]
(comp
(serve :port port :handler 'my-app.handler/app)
(hoplon)
(reload)
(cljs :optimizations :whitespace)
(wait)
)
)
in the procfile and build.boot respectively
how would I set JVM options?
via environment variables
check the boot wiki for details
ah cool
heroku sends jvm options doesn’t it?
@martinklepsch: regardless, i only get the errors when i try to serve, not during the build
@martinklepsch: is there a reason why i need to compile after serving to see my work?
@martinklepsch: if i already generated a target
folder, why can’t I just run (serve) (wait)
?
if you serve from the filesystem you can do that
right, and that’s what dir
does?
@thedavidmeister: all tasks have built in documentation you can view with boot task -h
, e.g. boot serve -h
yeah, i’ve read it all like 10x
it’s a bit cryptic and terse for me
oh ok. so :dir
is how you can specify a directory to serve from like target/
let me try one more time, now that you’ve said it
(deftask make-thing
[]
(comp
(hoplon)
(cljs)
)
)
(deftask serve-thing
[]
(comp
(serve :dir "target/" :port 3000 :handler 'my-app.handler/app)
(wait)
)
)
$ boot make-thing; boot serve-thing
2015-10-26 01:30:24.064:INFO:oejs.Server:jetty-7.6.13.v20130916
2015-10-26 01:30:24.120:INFO:oejs.AbstractConnector:Started [email protected]:3000
<< started Jetty on http://localhost:3000 >>
in terminal
but when i go there in chrome, i just get a WSOD
oh… I see now. you can’t use :handler
and :dir
at the same time
if you specify a handler that handler has to take care of serving static resources.
rightio
so this looks better
no more WSOD
my random number updating does not work
so something in castra is nqr
@martinklepsch: is :handler
able to do things that :dir
cannot?
oh yay, :dir
is working on heroku too
but no castra love on heroku or local 😞
@martinklepsch: well, thanks for helping. I have to get some sleep, it’s 2am here
@thedavidmeister: castra works via ring handlers so you’ll need to use :handlers
and not :dir
if you want to use castra
@martinklepsch: ah, ok. good to know.
@martinklepsch: so basically i just have to figure out the memory thing
@martinklepsch: if i figure out how to make a war
file, will that allow castra to work without me needing to compile things on a dyno?
I’m sorry I got no clue about that
well, thanks again for helping
i guess i’ll try again tomorrow
@thedavidmeister: good point about deploying... maybe deploying a war to heroku is better, and then doing the cljs compile locally
Hey guys. What’s the intent of the HLisp section of the documentation? Is the intention to list all the supported HTML tags? Is it intended to teach users the general pattern of HLisp usage as in (tag :attr attr-value :attr2 attr-value2 children)
? Perhaps I could help flesh this out.
levitanong: maybe the html2cljs
task from boot-hoplon
belongs to that topic too, since that's the one which can convert html 2 hlisp
but i think you should write whatever you feel appropriate and afterwards we can move it around
@onetom: Okay, I’ll give it a shot.
Thanks for the advice!