Import JavaScript library into node-red

It works perfectly now, thanks a lot!

1 Like

It is nice to know. If I could suggest something else it would be that you consider opening a new thread whenever you have an interesting use case like this one. The subject is very interesting but at the end of the day, it is hidden inside another thread, not having the visibility it deserves.

We have to thank the node create, Bart. He did a brilliant job (as usual) on developing this node and your use case confirmed (once again) that the node is useful for people.

2 Likes

@Andrei, Thank you for assisting Liudmila with this issue. Had not watched it, since the subject of the topic wasn't really pointing towards SSE... And thanks for the compliment!! But seems there is a less brilliant bug in my brilliant code :pleading_face:

@Miliks: I have published version 2.0.1 on NPM (and Node-RED catalogue). Now the Deploy button should become active as soon as you add header variables in the config screen, and now the header variables will be used... Would appreciate if you could test it, and let me know if it works now correctly!
Thanks!
Bart

2 Likes

Thanks a lot! Your code is really helpful! And i can confirm what the new version have no issue with the headers definition!

1 Like

Thanks again for your help! U r right, but i couldn't imagine what this is a different topic, i thought it just the matter of importing library at the very beggining of my question! Sorry for this!

1 Like

Back to the OP, it seems that if httpRoot is set, the static files are still served at the root rather than at the httpRoot. However we would expect these static files to be served at http://{httpRoot}/

Use httpStatic to set the static route