Clojurians
#boot
<
2016-07-25
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

thomas16:07:08

Hi, I kinda know that boot outputs its files to target/ but how is my web server supposed to pic it up in that case? I am using compojure at the monent and I am getting a 404 for my app.js

thomas16:07:38

(I know I should have used the tenzing template… but was stupid enough to ignore it)

micha16:07:59

@thomas: you want to use the wrap-resource ring middleware, i think

micha16:07:16

and the target directory isn't really useful for a compojure type app

micha16:07:33

are you planning to deploy this application to production as an uberjar?

micha16:07:52

yeah so i think you don't need the target dir at all

micha16:07:17

the uberjar will be serving resources from the classpath (from inside the jar)

thomas16:07:38

I got site-defaults … and I have it working on a different app

micha16:07:52

so you can remove the target task from your pipeline, and add the wrap-resource middleware to your ring stack

thomas16:07:05

yes.. the uberjar does the trick… but I would like to use it as my dev stack as well

micha16:07:16

yes this is what i'm saying

micha16:07:40

in dev you still want to get resources from the classpath, not from the target directory

micha16:07:50

the same as what you do in the uberjar

thomas16:07:08

so how do I tell my app what the classpath is then?

thomas16:07:17

sorry, very confused now

micha16:07:37

can you paste your build.boot file please?

thomas16:07:04

I just broke it….

thomas16:07:06

:disappointed:

micha16:07:06

or dm if you prefer

thomas16:07:33

let try and fix that first.

micha16:07:36

you don't need to configure class path

micha16:07:07

you did that already when you do set-env!

micha16:07:35

that's what set-env! is for

thomas16:07:01

at the moment it doesn’t seem to recognise the the various tasks :disappointed:

micha16:07:06

you just need to add the ring mw to fetch resources from the class path

thomas16:07:21

boot dev
             clojure.lang.ExceptionInfo: java.lang.IllegalArgumentException: No such task (dev)

micha16:07:48

i van take a quick look if you like

thomas16:07:57

Thank you @micha !!! much appreciated...

thomas16:07:22

And I need to catch the bus home now… but I’ll be back online a bit later again

thomas16:07:36

btw the latest tentacles is 0.5.1 , we are working with a locally update version. PR in the making.

micha16:07:10

that build.boot looks like it should work

micha16:07:25

i don't see any issues with it, dev task definitely looks like it's defined

thomas20:07:08

@micha got it (almost) sorted now… I generated a new build.boot from tenzing and ported my suff over and now it works again.

thomas20:07:21

thank you again for all your help. much appreciated.