Fork me on GitHub
#figwheel-main
<
2022-04-03
>
popeye17:04:25

i have developed my application using figwheel and less, How can I pack them into uberjar? is there any doc available? Once I complile it should start start the figwheel server

popeye17:04:01

how to build standalone uber jar for figwheel ?

practicalli-johnny18:04:51

An uberjar is only needed if the figwheel code is the front-end part of a back-end (full stack) project. I don't believe the figwheel server is suggested as a production deployment, only as an optional development tool I deploy my figwheel projects on GitHub pages using a GitHub Action (there are other similar services) https://github.com/practicalli/practicalli.github.io

popeye18:04:36

@U05254DQM, Thanks for your response, I have a 2 modules in my project one is front-end and another is backend (these both are separate module in same project) frontend I am running with 3300 and backend with 3000 ports , This how I developed now

popeye18:04:12

Also I am able to create server for backend, using uberjar,

practicalli-johnny18:04:12

If the results of the figwheel build (and the less complied files) are put into a resources/public directory and then an uberjar created, those files should be included in the uberjar file, they can then be served as files to the browser from the backend

practicalli-johnny18:04:10

You will need a route on the backend that serves the relevant html/CSS/JavaScript code if it's not part of the backend already

popeye18:04:29

so u mean , once the backend server is started it will start both backend and frontend servers?

practicalli-johnny18:04:30

Using any unzip tool, the contents of an uberjar file can be viewed. Make sure resources is set as a path on your backend project

practicalli-johnny18:04:16

The backend should serve up the front end when entering the relevant web address in a browser

popeye18:04:52

currently i have deigned as below ,each moule has project.clj and they are separate from each other, also they run on different server

projectname

   |- backend
   |- frontend

popeye18:04:03

how can we do that? any code examples ?

practicalli-johnny18:04:54

I don't have anything like that, sorry

popeye18:04:21

i mean any git repo you have seen earlier? or any git repo that might help me in this case

practicalli-johnny18:04:13

Nope. Seems strange to be running two servers. I would build the front-end into the backend and generate an uberjar, then deploy

popeye18:04:14

yeah last question, Any full stack application code om git I can refer too?

practicalli-johnny18:04:30

If your backend can serve static files, then you already have the code you need

popeye18:04:35

Thanks for your response @U05254DQM

popeye18:04:00

btw I have referred your clojure website multiple times 🙂 It helped me lot

practicalli-johnny18:04:37

https://luminusweb.com/ has a focus on full stack apps, but don't add too many options or it generates a lot of code that takes time to digest

practicalli-johnny18:04:36

Unless you need a custom server-side or backend API to be part of the same project, I would build the less and ClojureScript code as part of the continuous integration (CircleCI, GitHub Actions, etc)