js ajax library,javascript

1) To make static files available to Node-RED web pages, you can simply configure a static folder.

If you look in your settings.js file (normally found in ~/.node-red), you will see a commented out property called httpStatic, set this to a suitable folder, e.g.:

httpStatic: path.join('', 'public'),

which would use ~/.node-red/public on a standard installation.

Your URL's would all be in the form: /images/myimage.png etc.

2) To call a function in one of the libraries, you need to create a suitable page. Assuming you are using http-in/out, you would use the template node to create your page. Slightly trickier if you want to use the Dashboard. But not by much, in that case, you will use the Dashboard Template node.

If you want to build more complex front-end apps, you might also want to look at node-red-contrib-uibuilder. This does the heavy lifting of creating folders and adding web resources along with managing the in/out messages between the back-end and the front-end.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值