Javascript library docker problem

Hi, I'm at this stage . when I was with my local PC I'm able to connect my library successfully.

Now I have docker for that I've also mount the directory and provide path to settings.js

but I'm confused on my script tag. should I put localhost there or my hosted server IP??

<script type="text/javascript" src="http:/locahost:1880/api/t2e/dist/tableToExcel.js"></script>

note /api/ is enabled by httpadminroot::

also will this gonna work?

this is the error

@knolleary Hi Nick!! can you help me on this?

What have you set httpStatic to?

What is the full path/filename of the .js file?

Where are you trying to load this? I'm a node-red Dashboard ui_template?

What URL do you access the dashboard on?

What URL do you access the NR editor on?

My directory is /dataNR which is bind to docker container at /fileNR
in dataNR I've another directory called t2e which have files inside.

  1. httpStatic: '/filesNR'

  2. fullpath : /filesNR/t2e/dist/tableToExcel.js

  3. I want to provide JavaScript file for template node.

  4. http://mydomain.com:1880/dashboard/

5.http://mydomain.com:1880/api/

Then I think you should use /t2e/dist/tableToExcel.js as the path in the script tag. No need for the full domain as its served from the same domain as the dashboard.

1 Like