Hello,
I have an http endpoint, with a template node that display some html/javascript/css.
I would like to add a local css file and an image.
Something like that :
Search these forums for httpstatic, i am sure this will help you.
From a beginners guide to tweak your settings.js:
Static Content
This is important when using images in your flows or using node-red to serve web pages
uncomment and edit the line httpStatic as shown below:
httpStatic: ‘/home/pi/.node-red/staticContent/’,...
Then create the folder
staticContent
and place in your css- and image-file
The assets addresses are your server host plus path
As a more feature-rich alternative, you may want to look at the uibuilder node. It lets you manage your front end code either from within node-red or from an IDE such as VScode. It also provides a messaging interface, management of front-end libraries and more.
It would let you manage your html and css in the same place.
thank you all for your help!
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.