0

What webserver does shadow cljs with this config:

{:source-paths ["src"]
 :dependencies [[binaryage/devtools "1.0.6"]
                [nrepl "0.9.0"]
                [reagent "1.1.1"]]
 :builds       {:app {:target     :browser
                      :output-dir "public/js"
                      :asset-path "/js"
                      :modules    {:app {:entries [simpletodo.core]}}
                      :devtools   {:after-load simpletodo.core/mount-root}}}

 :dev-http     {3000 {:root    "public"
                      :handler user/app}}}

and using:

npx shadow-cljs release app 
David
  • 2,926
  • 1
  • 27
  • 61
  • 2
    Your question is unclear. `release` only takes your `:app` build and produces the `public/js/app.js` file. You can use any webserver to serve that. shadow-cljs is a development only tool and is not in any "release" environment. – Thomas Heller Jun 23 '22 at 22:16
  • @ThomasHeller I tried to do node main.js with that, but node just quit on me without error. I will check that again. – David Jun 24 '22 at 06:05
  • 2
    The post above is using `:target :browser`? Meaning it is supposed to be loaded in the browser, it will not run in node. For node related builds look into the `:target :node-script` or `:target :node-library` [docs](https://shadow-cljs.github.io/docs/UsersGuide.html#target-node). – Thomas Heller Jun 24 '22 at 06:57
  • Yes, it was target browser, i will try to load the main.js in the browser. – David Jun 24 '22 at 10:05
  • Please see my comment on https://stackoverflow.com/questions/72748735/hosting-the-build-from-shadow-cjls – Denis Fuenzalida Jun 25 '22 at 07:07

0 Answers0