Fork me on GitHub
#figwheel-main
<
2020-06-03
>
athomasoriginal21:06:54

Question about using a https://figwheel.org/docs/your_own_server.html with figwheel. I have a monorepo structure like this:

├── app
│   ├── deps.edn
│   ├── dev.cljs.edn
│   ├── resources
│   ├── src
│   └── target
├── app-server
│   ├── deps.edn
│   ├── resources
│   └── src
The app-server package is a simple backend server which will be used in production to server static files (html, css, js etc) in addition to some custom routes and the app package is the front end itself.

athomasoriginal21:06:23

What is the recommended approach to serving the static files like the index.html from the custom server?

athomasoriginal21:06:43

For more info, the app-server would run at localhost:3000 and then figwheel server could continue to run at localhost:9500

bhauman21:06:26

yeah so you just need to add the ../app/target/ to your resource paths

bhauman21:06:57

for your app server under development mode

bhauman21:06:03

I mean your classpath

bhauman21:06:33

and configure your server to serve static resources

bhauman21:06:03

If you are using ring then I believe site-defaults works??

athomasoriginal21:06:46

Works. Thanks!

👍 4