Context here https://twitter.com/anmonteiro90/status/851312033601437697
My purpose was to run Lumo directly with Node.js , then people like me who is more familiar with Node.js can use node --inspect
to use DevTools to find slow functions.
According to @anmonteiro90 that usage of Lumo is already supported. The thing to do is to compile with boot dev
, which looks like:
(deftask dev []
(comp
(check-node-modules)
(watch)
(speak)
(compile-cljs)
(sift-cljs-resources)
(cache-edn->transit)
(write-core-analysis-caches)
(target)
(bundle-js :dev true)))
Make sure you have run yarn
to get the latest dependencies. Then yarn dev
will be okay, which is an alias for:
node target/bundle.js -k lumo-cache -c target
-k
refers “cache”, -c
refers to “classpath”. So for my case, I can run with this command:
node --inspect target/bundle.js
It will generate an URL for Chrome to open the DevTools. to start with the most simple commands.
I tried, the Profiler in DevTools worked. Cheers.