This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-09-10
Channels
- # beginners (40)
- # boot (307)
- # boulder-clojurians (2)
- # carry (3)
- # cljs-dev (3)
- # cljsjs (16)
- # clojure (42)
- # clojure-greece (3)
- # clojure-russia (10)
- # clojure-uk (3)
- # clojurescript (116)
- # community-development (1)
- # component (5)
- # conf-proposals (2)
- # core-async (1)
- # crypto (2)
- # cursive (3)
- # devcards (1)
- # events (1)
- # hoplon (123)
- # om (28)
- # onyx (17)
- # pedestal (3)
- # proton (1)
- # re-frame (18)
- # reagent (26)
does anyone have a gist or know of any docs for building a hoplon app for production? maybe @thedavidmeister
i've tried digging thru the examples, but they are all broken, https://github.com/hoplon/demos/tree/master/deploy-uberwar
ooh, this looks promising https://github.com/tailrecursion/hoplon-castra-template
that would work, i'm stuck at the first step though - I can't get static files to build
prerendering is for search engine crawlers and for things like splash screens while the js is loading
the files you interact with are actually just hardlinks to the content-addressed, immutable blob storage
well , thanks for the help i'll keep digging. i'll throw together a wiki page when i figure out the full deploy - i'll need the server side running as well
i'm really just looking for a gist of some shell commands to run, figured this would be a common thing that someone has gone thru before
@danvingo: what kinda of shell commands are you looking to run?
I just think it's odd for all the effort and documentation that exists for hoplon that there isn't any mention of how to deploy for production
@danvingo: i think it's kinda hard to have exact examples since you can do pretty much whatever you want with boot as a build tool, we use it for regular OS related tasks too
Also hoplon builds regular web files, you can serve them however you want, if you do prerendering then you just have static things
for hoplon specifically - it's a web application framework so some common examples would be good
Agreed but I think that is more "target platform" dependent
i'm just saying from an ecosystem point of view my experience trying to get a simple app deployed has been terrible
Really? That's interesting iv found hoplon to be the easiest to build with from my experience thanks to boot
@keithsparkjoy: welcome :)
even just a page saying, hoplon uses boot, you can do a lot with boot so you should first make sure that you are comfortable with boot before continuing
so you can now make a folder that github pages will serve, you don't need to make the gh-pages branch anymore
compile hoplon to static files that go in the docs dir, push to github, and you've deployed to produciton
@danvingo: where are you trying to run your app? Documentation is a thing that's been expanding the last year we could have a wiki page with how to build for different env
got the war deployed with: heroku deploy:war target/project.war --app floating-island-79453
@danvingo: heroku supports docker images, there are docker images for boot out in the wild too
perhaps add a section to the getting started wiki page? https://github.com/hoplon/hoplon/wiki/Get-Started
@flyboarder i don't have a preference, just want to : 1. build static assets 2. start clojure server
Your app relies on castra yea? So you need a backend server also?
@micha I think the challenge is how do I host my app, this is something I also had to wrap my head around since I came to hoplon without Java knowledge
@flyboarder: what platform issues have you ran into? I hit an sqlite minor version incompatibility but only because osx had a slightly older version than my prod, so that was not strictly osx specific other than that if im shell scripting, then some of the utils have different options, eg. date, ls, du, test maybe but its sooo infrequent it doesn't really matter
@flyboarder: regarding resolution, just use the same aspect ratio when mirroring and then it won't be so crap!
@flyboarder: also on newer OS X versions you can put 2 full screen apps next to each other and specify the split ratio between them (not from keyboard though...)
@alandipert @danvingo: there is also brew install jetty-runner
(i havent tried it yet though)
@alandipert @micha: sounds like you would have liked acme back then 🙂 http://plan9.bell-labs.com/sys/doc/acme/acme.html
@jamieorc @flyboarder im also using (boot-)environ still but im considering https://www.dotkam.com/tag/cprop/ (which was missing from the "Real World Clojure" article)
@danvingo: are you using heroku build packs?
@onetom Thanks. How do I get hoplon/ui running. boot dev throws errors that it can’t find the lib when I include it in the project.
@micha: i've seen those strange castra errors too. i think it happens when you cancel an xhr request (because boot-reload reloaded the page for example)
git clone [email protected]:hoplon/ui
cd ui
boot build-jar
then your project will find it@flyboarder @danvingo the basic Hoplon deploy is simple - but it gets more difficult with Castra - maybe a docker image for Hoplon with Castra and Boot for good measure would be nice - a one stop image
@flyboarder: thanks :)
@tbrooke yeah i think when you start using hoplon you really want to use castra without knowing all the difficulties of hosting java servers, i think if we had a Serving Hoplon and Serving Hoplon with Castra in the wiki that would help guide those coming to hoplon, especially without java knowledge
@tbrooke @danvingo https://github.com/hoplon/hoplon/wiki/Serving-Hoplon Feel free to add….
Any one else looked at https://www.netlify.com/ they are pretty good for static sites, Hoplon without castra, and they support build tools including leiningen - I mentioned boot to them and they said they were adding it but I’m not sure if they did
@tbrooke: interesting, i’ve heard good things about them before, but looks like they’ve come a long way since they were just a cdn. let me know what you find out, will do the same.
@tbrooke are you using http/2 with them?
@flyboarder No consciously but they say it is enabled for all https: https://www.netlify.com/blog/2015/10/20/netlify-news-no-6
Thanks @flyboarder will update with what i've found
@danvingo if we can solve your issues with some documentation i think it’s worth it for everyone 🙂
Sometimes I’m getting a "core.cljs:120Uncaught ReferenceError: jQuery is not defined” error. This happens when I call a function directly in the rpc cljs file.
@jamieorc I would imagine your cljs file is loading before jquery then, try adding cljsjs.jquery to the namespace in your :require
@flyboarder that did it. Cheers
@flyboarder I keep getting "#error {:message Server error., :data {:castra.core/exception true}}” Is there a way to see what the exception is?
Should be showing up in your console no?
no error there. I’m trying to send a list back from mongodb using monger. I have a similar, though slightly simpler app that works. I’ve been trouble-shooting this a while and am stumped. I can return a hard-coded list no problem. When I output the list to console, it’s what I expect. Castra blows up on the list. Yet something very similar in another app is fine with Monger.
I dont use castra anymore, but I remember running into similar issues
@micha do you have a suggestion for castra exceptions?
I remember you solved this for me before too
@flyboarder what’re you using rather than castra?
🙏 No-Backend
@jamieorc I kinda hate the idea of a backend for my web apps, also many databases have little to no security because they assume opperation on a trusted network. Thats like saying not to put a lock on your house because you have a fence.
I’m experimenting with integrating hoplon/castra with a large existing backend, so I’m rather stuck with it
an example from one of our applications: https://gist.github.com/micha/0a8ac8f1f21a32266a0a93703df9144f#file-rpc-cljs-hl-L64-L67