Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

degree9/boot-nodejs

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clojars Project Dependencies Status Downloads Slack

Node.js wrapper task for boot-clj.



boot-nodejs is developed and maintained by Degree9


  • Provides nodejs task for generating node.js entrypoint.
  • Provides 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!

Usage

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))))

Task Options

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.


Patreon
Support this and other open-source projects on Patreon!


About

Node.js wrapper task for boot-clj

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.