Fork me on GitHub
#hoplon
<
2016-09-09
>
flyboarder00:09:10

@micha: how's the binding thing you were working on going? I'm running into an issue I think that would solve

micha00:09:50

i think we can merge it to master if you like

flyboarder00:09:03

What branch is it in now? I can just pull the files out

micha00:09:31

^^ that one

flyboarder00:09:33

Cool thanks!

alandipert03:09:14

hey dvingo, welcome

dvingo03:09:43

i'm struggling to figure out how to run a hoplon file in prod - i have this task

dvingo03:09:44

(deftask make-war "Build a war for deployment" [] (comp (hoplon) (cljs :optimizations :advanced) (uber :as-jars true) (web :serve 'my-app.handler/app) (war) (target :dir #{"target"})))

dvingo03:09:02

and it ran successfully, but i don't know how to start it - do i need tomcat?

alandipert03:09:15

depends, what is prod for you?

alandipert03:09:20

like, how do you prefer to deploy?

dvingo03:09:14

any gnu/linux vps will do

dvingo03:09:47

i'm just trying to run the packaged version locally for now on mac osx

dvingo03:09:26

or running on heroku would work as well

alandipert03:09:47

cool, so if you install tomcat or jetty on your VPS, there will be a directory you can drop the .war file that make-war produces

alandipert03:09:18

even easier, install boot on your vps and serve it that way

dvingo03:09:37

ah cool - just the usual boot server task?

dvingo03:09:46

great, thanks!

alandipert03:09:28

oh also, a handy thing to know about

alandipert03:09:31

java -jar jetty-runner-9.2.9.v20150224.jar target/project.war

alandipert03:09:26

jetty is a servlet container that you can install with the linux package manager

alandipert03:09:34

but youc an find that war and see if it will work quickly

alandipert03:09:43

err, find that jetty-*.jar file

alandipert03:09:07

boot serve uses embedded jetty, yet another way to run it

alandipert03:09:43

basicaly there are an infinite number of ways to run jetty 😏

dvingo03:09:51

for a heroku setup, would i run boot serve in their Procfile?

alandipert03:09:07

hm, you'll have to cruise the boot wiki or google blog posts

alandipert03:09:12

i'm not sure what the state of the art is

dvingo03:09:24

kk, i'll play around, thanks a ton for the help!

alandipert03:09:33

one thing to avoid is compiling your cljs on heroku, i've seen people have problems with that because they're pretty stingy about memory

alandipert03:09:49

surely, godspeed

thedavidmeister10:09:59

ah i remember when ^^ was me

adamfrey16:09:54

how do I get the server stacktrace from a castra error to print in the console? the xhr request is returning it under the :stack key in the transit response, but my error value in my cell doesn’t include it.

adamfrey16:09:15

I see that there’s some code in castra to include it under the ”serverStack” key, but when I try to get that property there’s nothing there

micha16:09:54

yeah this is a puzzling thing, one sec i will paste my code

micha16:09:29

this is using the cljs-console library to print the debug message, from here https://github.com/adzerk-oss/cljs-console

micha16:09:28

the approach i'm using there is to attach a global error handler

micha16:09:41

whenever it gets an exception from the server it prints it

micha16:09:51

(not in production of course, only in dev)

micha16:09:29

also i apologize for the messiness of the code there, it's not so pretty but it works 🙂

adamfrey16:09:03

thanks, I can make this work

micha16:09:29

something mysterious happens sometimes with the :stack and .-serverStack

micha16:09:51

i haven't been able to pin it down

adamfrey16:09:11

what’s the symptom?

micha16:09:36

it seems like sometimes one or the other is missing

micha16:09:56

i guess also sometimes there is an exception in the xhr that never makes it to the backend at all

micha16:09:09

like connection refused or something

flyboarder19:09:36

Does anyone know if there is something that will take a list of cell/function pairs and update each cell according to the function?

flyboarder19:09:35

im thinking i will need to make some sugar round dosync and reset! for this to work

jamieorc19:09:20

any preferred conf libs? (enrion, aero, nomad…)

jamieorc19:09:18

dang, I missed adzerk’s env

flyboarder19:09:23

most things aren't

shaun-mahood21:09:31

@jamieorc: I’ve not used any of them, but this seems like a pretty decent (and recent) comparison of a few - http://realworldclojure.com/application-configuration/

jamieorc21:09:42

@shaun-mahood thanks. I’m acquainted Paul—he lives here in Charlottesville. Checking out his article now.