# Reading from constants.js file from HTML in custom node

**URL:** <https://discourse.nodered.org/t/reading-from-constants-js-file-from-html-in-custom-node/71247>\
**Category:** Developing Nodes\
**Created:** [25 November 2022 14:40 UTC](https://discourse.nodered.org/t/reading-from-constants-js-file-from-html-in-custom-node/71247 "2022-11-25T14:40:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)\
**Post date:** [25 November 2022 14:46 UTC](https://discourse.nodered.org/t/reading-from-constants-js-file-from-html-in-custom-node/71247/2 "2022-11-25T14:46:28Z")

</div>

Hi @ItsDaveTheWave

In your nodes root folder `node-red-contrib-cool-node`, add a folder `resources`  
you can then call into this folder like so, in your HTML file

`<script src="resources/node-red-contrib-cool-node/constants.js"></script>`

[Loading extra resources in the editor : Node-RED (nodered.org)](https://nodered.org/docs/creating-nodes/resources)

---

_[View the full topic](https://discourse.nodered.org/t/reading-from-constants-js-file-from-html-in-custom-node/71247)._
