How to share a node in the right way?

I've created a node which connects to the the API of electricity provider Greenely and pulls out data related to your installation such as hourly price, usage etc. The code is complete and I've tested it extensively on my home installation. But now I want to give back to the community by publishing it for others to use.

I don't want to screw anything up and make sure I've crossed all the Ts and dotted all the is. So I'm asking for any and all guidance in assuring my node is correct and up to par. And then of course details on how to publish it.

Thanks in advance!

2 Likes

Ultimately, you publish your node to npm then add it to the flows library.

If you want to get feedback you can always release with a beta tag.

Read here: Packaging : Node-RED for more info regarding naming

For publishing with a beta tag: Adding dist-tags to packages | npm Docs

E.g. npm publish --tag beta

1 Like

Start by making the code available on your GitHub repository. Then others can look at it and check that it installs ok direct from GitHub. To install direct from GitHub use
npm install yourGitHubName/nodename

1 Like

I am at a similar stage with a module that I am developing. I have done the install from GitHub as you have suggested. I can see that my nodes are installed and working but I notice that that changes to the github repo are not reflected in the installed instance after a restart of node-red as they were with my previous local install.
Would I need to remove and reinstall via GitHub after a change or is there some other way to refresh.

Node red has no way of knowing that you have updated the repo.
Just run the install command again
npm install yourgitname/yourmodulename
You should then see the modified code in .node-red/node_modules/yourmodulename.

1 Like