# Import JavaScript library into node-red

**URL:** https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665
**Category:** Dashboard
**Created:** [6 February 2019 15:45 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665 "2019-02-06T15:45:40Z")
**Posts on this page:** 7
**Page:** 2

<div class="post-metadata">

### Author: ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)
#### Post date: [20 May 2019 15:22 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/21 "2019-05-20T15:22:50Z")

</div>

It works perfectly now, thanks a lot!

---

<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: [20 May 2019 15:34 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/22 "2019-05-20T15:34:53Z")

</div>

It is nice to know. If I could suggest something else it would be that you consider opening a new thread whenever you have an interesting use case like this one. The subject is very interesting but at the end of the day, it is hidden inside another thread, not having the visibility it deserves.

We have to thank the node create, Bart. He did a brilliant job (as usual) on developing this node and your use case confirmed (once again) that the node is useful for people.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [20 May 2019 20:12 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/23 "2019-05-20T20:12:07Z")

</div>

@Andrei, Thank you for assisting Liudmila with this issue. Had not watched it, since the subject of the topic wasn't really pointing towards SSE... And thanks for the compliment!! But seems there is a less brilliant bug in my brilliant code 🥺

@Miliks: I have published version **2.0.1** on NPM (and Node-RED catalogue). Now the Deploy button should become active as soon as you add header variables in the config screen, and now the header variables will be used... Would appreciate if you could test it, and let me know if it works now correctly!  
Thanks!  
Bart

---

<div class="post-metadata">

### Author: ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)
#### Post date: [21 May 2019 07:55 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/24 "2019-05-21T07:55:35Z")

</div>

Thanks a lot! Your code is really helpful! And i can confirm what the new version have no issue with the headers definition!

---

<div class="post-metadata">

### Author: ![Miliks](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/miliks/32/7598_2.png) [@Miliks](https://discourse.nodered.org/u/Miliks)
#### Post date: [21 May 2019 08:00 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/25 "2019-05-21T08:00:38Z")

</div>

Thanks again for your help! U r right, but i couldn't imagine what this is a different topic, i thought it just the matter of importing library at the very beggining of my question! Sorry for this!

---

<div class="post-metadata">

### Author: ![T0T4R4](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/t0t4r4/32/10850_2.png) [@T0T4R4](https://discourse.nodered.org/u/T0T4R4)
#### Post date: [14 November 2019 04:15 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/26 "2019-11-14T04:15:32Z")

</div>

Back to the OP, it seems that if httpRoot is set, the static files are still served at the root rather than at the httpRoot. However we would expect these static files to be served at http://{httpRoot}/

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [14 November 2019 11:19 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/27 "2019-11-14T11:19:08Z")

</div>

Use `httpStatic` to set the static route

[Previous page](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665.md?page=1)
