Src file custom template

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 :

This seems like a simple thing to do but I cannot find a solution. I need to upload my css (or image) file into the server, but where? Thanks!

Search these forums for httpstatic, i am sure this will help you.

1 Like

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


and place in your css- and image-file

The assets addresses are your server host plus path

1 Like

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.

1 Like

thank you all for your help!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.