degree9 / boot-nodejs Goto Github PK
View Code? Open in Web Editor NEWNode.js wrapper task for boot-clj
License: MIT License
Node.js wrapper task for boot-clj
License: MIT License
Hello @flyboarder!
I am looking into this for launching a nodejs script automatically when using boot-figreload
with :target :nodejs
. I was wondering if serve
can actually launch a normal script and if so whether it is a good idea to rename it to something else like node
or launch
?
I am going to try anyway and sorry if this is more like a usage question!
Hello @flyboarder,
this is actually a problem that I already see will be difficult to solve cleanly in boot
.
I am basically getting:
Figwheel: Can't start Figwheel!! Please make sure ws is installed
do -> 'npm install ws'
With the following task:
(deftask dev
"Launches the interactive environment"
[p port PORT int "Set the repl port"]
(let [port (or port 5055)]
(comp (watch)
(notify)
(reload :client-opts {:debug true}) ;; boot-figreload task
(cljs-repl :nrepl-opts {:port port})
(cljs :source-map true :optimizations :none)
(serve :script "app")))) ;; boot-nodejs task
This happens because the app.js
file is launched from the boot cache and of course does not have the correspondent node_modules
anywhere, neither in the folder, nor in the parent (which is the case when you actually execute a script from target
).
The solution of copying node_modules
to the boot cache is a scary one, so I leave this here open for discussion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.