figwheel-main

popeye 2022-04-03T17:25:25.902799Z

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

popeye 2022-04-03T17:48:01.618979Z

how to build standalone uber jar for figwheel ?

practicalli-johnny 2022-04-03T18:17:51.363339Z

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

popeye 2022-04-03T18:23:36.197979Z

@jr0cket, 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

popeye 2022-04-03T18:24:12.787729Z

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

practicalli-johnny 2022-04-03T18:27:12.630869Z

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-johnny 2022-04-03T18:29:10.636749Z

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

popeye 2022-04-03T18:30:29.308369Z

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

practicalli-johnny 2022-04-03T18:30:30.458359Z

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-johnny 2022-04-03T18:31:16.693809Z

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

popeye 2022-04-03T18:31:52.679119Z

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

popeye 2022-04-03T18:32:03.486969Z

how can we do that? any code examples ?

practicalli-johnny 2022-04-03T18:36:54.693569Z

I don't have anything like that, sorry

popeye 2022-04-03T18:38:21.244319Z

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

practicalli-johnny 2022-04-03T18:41:13.438409Z

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

popeye 2022-04-03T18:46:14.720659Z

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

practicalli-johnny 2022-04-03T18:47:30.328109Z

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

popeye 2022-04-03T18:52:35.036139Z

Thanks for your response @jr0cket

popeye 2022-04-03T18:53:00.000689Z

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

practicalli-johnny 2022-04-03T18:54:37.199759Z

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-johnny 2022-04-03T18:19:36.349599Z

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)