# Send data from custom node node.js script to html/browser?

**URL:** <https://discourse.nodered.org/t/send-data-from-custom-node-node-js-script-to-html-browser/80838>\
**Category:** Developing Nodes\
**Created:** [27 August 2023 10:36 UTC](https://discourse.nodered.org/t/send-data-from-custom-node-node-js-script-to-html-browser/80838 "2023-08-27T10:36:36Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 August 2023 13:51 UTC](https://discourse.nodered.org/t/send-data-from-custom-node-node-js-script-to-html-browser/80838/9 "2023-08-27T13:51:49Z")

</div>

> [@FezVrasta](#):
>
> `RED.httpAdmin.use`

Any reason you chose `use` instead of a specific verb?

> [@FezVrasta](#):
>
> Nope, not working,

Here is a working example.

> [@Using a client side JS file](https://discourse.nodered.org/t/using-a-client-side-js-file/47338/4):
>
> There are a few ways to achieve this but ultimately you have to serve the code via an endpoint. Here is an example from one of my nodes - I like this pattern as I can share the js with both client and server side. In your project, add folders /static/, /static/js/ & /static/css/ Add a "dumb" node-red node called (for example) app.js - this is the end point that serves files from /static/ to http://xxxxx/image\_tools/static/\*\*\* module.exports = function (RED) { /\*\* \* Enable http route …

---

_[View the full topic](https://discourse.nodered.org/t/send-data-from-custom-node-node-js-script-to-html-browser/80838)._
