# 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:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [6 February 2019 15:50 UTC](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665/2 "2019-02-06T15:50:05Z")

</div>

Hi @abra

If you want to use third party libraries as part of your node-red dashboard then you need to:

1. copy those libraries to a directory of your choosing
2. set `httpStatic` in your node-red settings file to point at that directory.

The node-red runtime will then serve the files from the directory.

You can then add the appropriate `<script>` and `<style>` tags to a ui\_template node in order to load that content into your dashboard.

For example,

1. create a directory called `/home/user/node-red-static/charts/`
2. copy all of the chart.js content into that directory - lets assume that includes a file called `chart.js`.
3. set `httpStatic` in your settings file to `/home/user/node-red-static`
4. restart Node-RED
5. check you can load `http://localhost:1880/charts/chart.js` in your browser.

In your ui\_template you'd need:

```auto
<script src="http://localhost:1880/charts/chart.js"></script>

```

Of course, you'll have to refer to the chart.js documentation to understand exactly what files need including in your html page.

---

_[View the full topic](https://discourse.nodered.org/t/import-javascript-library-into-node-red/7665)._
