This node allows the execution of Node.js application within ComfyUI by leveraging the ComfyUI-NODEJS, which starts alongside ComfyUI and facilitates the installation of Node.js. The integration enables Python subprocesses to execute Node.js scripts.
This node allows the execution of Node.js application within ComfyUI by leveraging the ComfyUI-NODEJS, which starts alongside ComfyUI and facilitates the installation of Node.js. The integration enables Python subprocesses to execute Node.js scripts.
Note: For non-windows user please install NodeJS before running this node
NodeJS Installation: https://nodejs.org/en/download
Windows users can skip this section
For any query you can join my discord server: https://discord.gg/Z44Zjpurjp
Using comfy-cli
comfy node registry-install comfyui-nodejs
Using manual method
https://github.com/daxcay/ComfyUI-NODEJS.git
Using Comfy Manager (https://github.com/ltdrdata/ComfyUI-Manager)
To run nodejs project(s) you will need to do paste your project(s) folder in the nodejs directory of ComfyUI-NODEJS.
ComfyUI\custom_nodes\ComfyUI-NODEJS\nodejs
To run a project successfully verify the below steps carefully.
Every project should have two mandatory files in root folder one app.js and another package.json like this
app.js is just for representation actual name could be anything. (main.js, foo.js). but in package.json file mention correct name.
package.json looks something like this:
{
"name": "project1",
"version": "1.0.0",
"description": "",
"main": "app.js",
"scripts": {
"dev" : "node dev.js",
"production" : "node app.js",
"test": "node test.js"
},
"author": "",
"license": "ISC",
"dependencies": {
"express": "^4.19.2"
}
}
Ensure your project package.json to have a "production" script in scripts objects.
Now run/restart comfyui.
Open any browser and head to http://localhost:3000
. If NodeJs is installed successfully it should return:
Demo projects are given in nodejs folder in case you don't understand anything. delete them when running actual projects or build upon them.
ā Daxton Caylor - ComfyUI Node Developer