# Src file custom template

**URL:** https://discourse.nodered.org/t/src-file-custom-template/66481
**Category:** General
**Tags:** http-request
**Created:** [16 August 2022 10:23 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481 "2022-08-16T10:23:13Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![joshuaC](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@joshuaC](https://discourse.nodered.org/u/joshuaC)
#### Post date: [16 August 2022 10:23 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481/1 "2022-08-16T10:23:13Z")

</div>

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 :

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!

---

<div class="post-metadata">

### Author: ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)
#### Post date: [16 August 2022 10:27 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481/2 "2022-08-16T10:27:41Z")

</div>

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

---

<div class="post-metadata">

### Author: ![knoepsche](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knoepsche/32/69450_2.png) [@knoepsche](https://discourse.nodered.org/u/knoepsche)
#### Post date: [16 August 2022 10:31 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481/3 "2022-08-16T10:31:07Z")

</div>

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

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [16 August 2022 10:36 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481/4 "2022-08-16T10:36:53Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![joshuaC](https://avatars.discourse-cdn.com/v4/letter/j/d6d6ee/32.png) [@joshuaC](https://discourse.nodered.org/u/joshuaC)
#### Post date: [16 August 2022 11:05 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481/5 "2022-08-16T11:05:22Z")

</div>

thank you all for your help!

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [30 August 2022 11:05 UTC](https://discourse.nodered.org/t/src-file-custom-template/66481/6 "2022-08-30T11:05:50Z")

</div>

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