Fork me on GitHub
#boot
<
2017-03-31
>
dominicm07:03:47

@qqq you don't need to. Boot-cljs has a cljs-repl-env task. You can also use the cljs-repl as a normal repl.

qqq07:03:36

@dominicm : so I'm using emacs + cider

qqq07:03:42

how do I inject cider without the add-middleware call ?

dominicm07:03:01

@qqq if you're using a recent version of CIDER, if you use jack-in, it'll add them via magic afaik.

qqq07:03:18

"add them via magic afaik" <-- rofl

lsenta11:03:43

Is anyone here using boot-http serve with an SPA by any chance?

pesterhazy11:03:00

many people are

lsenta11:03:13

I'm looking for a correct handler/not-found handler that works with routing

pesterhazy11:03:14

what do you mean exactly?

lsenta11:03:50

it's pretty dumb: I have this SPA with client side routing, but if I refresh localhost/my/page it'll 404

lsenta11:03:25

I've tried hacking my handler but now it's starting to break with some ring errors, I'm doing cljs only

lsenta11:03:24

so if you happen to have a correct handler for that, that'd spare me (re)learning about ring and the boot env just for this use case

pesterhazy11:03:53

ah I understand

pesterhazy11:03:47

not sure if boot-http can do that

lsenta11:03:54

You can provide a general handler and a not-found handler

lsenta11:03:31

I tried slurping a hardcoded target/some/path/index.html on 404 but it didn't work

lsenta11:03:02

I guess a solution would be to "proxy" the root on 404s

pesterhazy11:03:43

what I do is to use bidi to have a route that serves /app/* as index.html

pesterhazy11:03:55

but I agree it's a bit complicated for this simple use cae

lsenta11:03:48

Does it works with boot refresh and all the fancy tools that (I guess) inject code in the html?

pesterhazy11:03:25

yes I don't see why not

pesterhazy11:03:44

just like boot-http it just serves the resource

pesterhazy11:03:52

["admin" :admin]
["admin/" [["" :admin] [true :admin]]]

pesterhazy11:03:11

this is the pattern I use to catch everything starting with /admin in bidi

hit02311:03:03

Doubt regarding boot codebase: how do I access the environment map? ( I want to get the :source-paths to fix an issue )

martinklepsch11:03:25

@hit023 get-env should work

hit02311:03:45

Moreover, is :source-paths a Set?

hit02313:03:07

Also, what does the file 'mkdocs' do in the repo?

richiardiandrea14:03:58

You need to install Maven it seems @hit023

richiardiandrea14:03:26

@qqq yes cider addition used to be manually but now cider does it for you

richiardiandrea14:03:32

It just builds the command line command for you, you can see which one at the bottom or in the message buffer and if something does not work as expected try to copy that and execute it in a terminal

qqq17:03:59

@richiardiandrea : that doens't work for me as Emacs = local laptop; boot = runs on remote server

qqq17:03:08

but I got it working via another way

qqq17:03:25

next issue: what is the correct way to setup boot with midje? I think main issue to just run auto tests