# Call .js scripts in function node

**URL:** https://discourse.nodered.org/t/call-js-scripts-in-function-node/54078
**Category:** General
**Created:** [21 November 2021 19:41 UTC](https://discourse.nodered.org/t/call-js-scripts-in-function-node/54078 "2021-11-21T19:41:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![metter](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@metter](https://discourse.nodered.org/u/metter)
#### Post date: [21 November 2021 19:41 UTC](https://discourse.nodered.org/t/call-js-scripts-in-function-node/54078/1 "2021-11-21T19:41:30Z")

</div>

I use node red for a while now, not very solid in programming yet.  
Now I have a principal question:

I run node red in docker on a ubuntu server.

I would to play around with tensorflow and found an example on github that I would like to replicate in node red. This is not a Node Red specific project.

I installed tensorflow inside the node red container.  
The example has an `index.html`, `script.js` and `model.js` file.  
I put `script.js` and `model.js` in separate function nodes. The index.html in a UI template node.

Right of the bat I can tell that I cannot call `script.js` and `model.js` in the UI template node. So I am planning to replicate calling the functions inside the .js files by using node red nodes like UI buttons and such.

I thought it would be wise to ask this question before potentially wasting weeks and finding out it's not possible in node red.

Is this the correct approach? Can I use javascript that calls on the tensorflow module in a function node and, with a bit of fiddling, replicate such a project?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [20 January 2022 19:41 UTC](https://discourse.nodered.org/t/call-js-scripts-in-function-node/54078/2 "2022-01-20T19:41:59Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
