
Node.js wrapper task for boot-clj.
boot-nodejs is developed and maintained by Degree9
nodejs task for generating node.js entrypoint.serve task for executing node.js server.The following outlines basic usage of the task, extensive testing has not been done. Please submit issues and pull requests!
Add boot-nodejs to your build.boot dependencies and require the namespace:
(set-env! :dependencies '[[degree9/boot-nodejs "X.Y.Z"]])
(require '[degree9.boot-nodejs :refer :all])
Generate a node.js cljs edn file.
boot nodejs -i app.server/init -e nodejs
Start a node.js server script.
boot serve -s nodejs
Use in a wrapper task:
(boot/deftask start-server
"Start app server."
[...]
(let [...]
(comp
(nodejs :init-fn 'app.server/init)
(serve))))
The nodejs task exposes options for generating a node.js compatible .cljs.edn file.
e edn VAL str "Node.js main edn name. (nodejs)"
i init-fn VAL sym "Node.js init function."
d develop bool "Sets nodejs-cljs dev flag."
By default the nodejs task will produce a nodejs.cljs.edn file.
The serve task exposes options for starting a Node.js instance.
s script VAL str "Node.js main script file. (nodejs)"
If you use a custom :edn name for nodejs task, that name can be used for the :script option of the serve task.
Support this and other open-source projects on Patreon!
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |