如何在Node App中嵌入Node-Red的多个实例 [英] How to embed multiple instances of node-red in node app

查看:689
本文介绍了如何在Node App中嵌入Node-Red的多个实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此处的节点红色文档提供了有关如何在nodejs应用程序中嵌入单个节点红色应用程序的信息- http: //nodered.org/docs/embedding

Node-red documentation here gives info on how to embed a single node-red app inside a nodejs app - http://nodered.org/docs/embedding

我们希望我们站点的用户在不同端口上具有自己的node-red,以便进行一些自定义编程。

We wanted our site's users to have their own node-red's on different ports for some custom programming. Is it possible to embed multiple node-red apps in a nodejs applicaiton?

我尝试通过更改每个具有不同端口的呼叫的设置来重复嵌入的相同步骤,但是只重复了一次,是否可以在nodejs应用程序中嵌入多个节点红色的应用程序?它被创建。第一次,基于设置创建节点红色实例。下次调用时,将使用端口。我认为这与节点有关,需要进行缓存以及所有...此问题的任何解决方法?

I tried repeating same steps for embedding by changing settings of each call with different port but only one time it is created. First time, a node-red instance is created based on settings. Next time we call, we get port in use. I assume this has something to do with node require doing caching and all... Any workaround for this issue?

推荐答案

不,当前,Node-RED没有多用户功能,也无法在一个进程中实例化多个实例。

No, currently Node-RED has no multi-user capabilities and no way to instantiate multiple instances in one process.

您必须为每个用户运行单独的应用程序实例。请看类似 FRED 之类的示例。这会运行单个实例并对其进行代理,以使集成看起来像都在同一端口/域上

You'll have to run separate instances of the application for each user. Have a look at something like FRED for an example of this. This runs individual instances and proxies them to make the integration look like it's all on the same port/domain

这篇关于如何在Node App中嵌入Node-Red的多个实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆