# Location of httpStatic

**URL:** https://discourse.nodered.org/t/location-of-httpstatic/10649
**Category:** General
**Created:** [29 April 2019 17:27 UTC](https://discourse.nodered.org/t/location-of-httpstatic/10649 "2019-04-29T17:27:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dave/32/10827_2.png) [@Dave](https://discourse.nodered.org/u/Dave)
#### Post date: [29 April 2019 17:27 UTC](https://discourse.nodered.org/t/location-of-httpstatic/10649/1 "2019-04-29T17:27:41Z")

</div>

I have set httpStatic: '/media/usbHDD/nas/', in my settings.js file everything is working fine however my question is can I retrieve this information in a function node.?

---

<div class="post-metadata">

### Author: ![Andrei](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/andrei/32/10446_2.png) [@Andrei](https://discourse.nodered.org/u/Andrei)
#### Post date: [30 April 2019 04:04 UTC](https://discourse.nodered.org/t/location-of-httpstatic/10649/2 "2019-04-30T04:04:23Z")

</div>

A possible solution (not sure if there is another way) is to add a property to `functionGlobalContext` in `settings.js`. Then it can be easily retrieved in a function node.  
It is a sort of double work (as you already created `httpStatic` entry in `settings.js` but it works.

Example:

```auto
    functionGlobalContext: {
        		myStatic:'/home/andrei/node-red-static/',

```

Then recover with

```auto
var test1 = global.get('myStatic');

```

---

<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: [30 April 2019 05:52 UTC](https://discourse.nodered.org/t/location-of-httpstatic/10649/3 "2019-04-30T05:52:26Z")

</div>

I think that you should be able to do something like `mystatic: this.httpStatic` so you only set it once.

Alternatively, set a const outside the exports and use the value in both places.

If you are writing custom nodes, you can retrieve the values in settings.js but I don't know that you can otherwise.
