Node-REDを設定するために以下のプロパティが利用できます。
一般的なアプリケーションとして実行するとき、設定ファイルから設定をロードします。 設定ファイルについてのさらなる情報そしてそれがどこにあるのかについては、このガイドを読んでください。
[組込みアプリケーション]として実行するとき、を設定オプションはRED.init()
という呼び出し関数に渡されます。
しかしこの場合の実行時には、特定のプロパティは無視され、
組込みアプリケーションの実装に依存します。
flows_<hostname>.json
$HOME/.node-red
nodes
ディレクトリを探索します。
このプロパティはNode-REDのインストール機構以外からインストールされたノードなどのため、Node-REDが探索をおこなう追加のディレクトリを指定します。
ここで指定したディレクトリ内にノードの.js
と.html
ファイルを配置するとNode-REDのパレットに表示されるようになります。Node-REDの外部のパスも指定できます。
デフォルト: $HOME/.node-red/nodes
0.0.0.0
-
全てのIPv4インタフェース.
スタンドアローンのみ.
1880
.
スタンドアローンのみ.
false
が設定されている場合、すべての管理エンドポイントが無効になります。
これにはAPIエンドポイントとエディタUIの両方が含まれます。エディタUIのみを無効にするためには、以下のdisableEditor
プロパティを参照してください。デフォルト: /
adminAuth
を参照してください。
エディタUIのHTTPベーシック認証を有効にします。:
httpAdminAuth: {user:"nol", pass:"5f4dcc3b5aa765d61d8327deb882cf99"}
pass
プロパティは実際のパスワードのmd5ハッシュ値を指定します。上記の例では実際にBasic認証ダイアログへ入力するパスワードはpassword
という文字列になります。以下のコマンドを実行することによってハッシュ値が得られます。:
node -e "console.log(require('crypto').createHash('md5').update('YOUR PASSWORD HERE','utf8').digest('hex'))"
スタンドアローンのみ.
false
が設定されている場合、すべてのノードのHTTPエンドポイントは無効になります。デフォルト: /
httpAdminAuth
を参照してください。httpRoot
を指定するとhttpAdminRoot
とhttpNodeRoot
を同じパスで上書きします。スタンドアローンのみ.
true
を指定するとフローエディタが無効になります。httpAdminRoot
をfalse
にした場合はUIもAPIも無効になりますが、こちらはUIのみ無効になります。デフォルト: false
/
から提供されます。例えば/home/username/.node-red/
と指定した場合、/home/username/.node-red/index.html
を作成すると/
へアクセスすると作成したindex.html
が表示されます。
httpStatic
を指定する場合、/
ではないパスでエディタUIを利用できるようにするため、httpAdminRoot
は/
より下層のパスにする必要があります。
スタンドアローンのみ.
httpAdminAuth
を参照してください。httpNodeMiddleware: function(req,res,next) {
// Perform any processing on the request.
// Be sure to call next() if the request should be passed
// to the relevant HTTP In node.
}
デフォルトのレベルは info
です。限られたフラッシュストレージの組込みデバイスではディスクへの書き込みを最小限にするために fatal
を設定することもできます。
['subflows', 'common', 'function', 'network', 'sequence', 'parser', 'storage'],
Note: サブフローを作成するまでサブフローカテゴリは空のままで、 パレットには表示されません。
エディタのテーマは次の設定オブジェクトを使用して変更することができます。すべての項目はオプションです。
editorTheme: {
page: {
title: "Node-RED",
favicon: "/absolute/path/to/theme/icon",
css: "/absolute/path/to/custom/css/file",
scripts: [ "/absolute/path/to/custom/script/file", "/another/script/file"]
},
header: {
title: "Node-RED",
image: "/absolute/path/to/header/image", // or null to remove image
url: "http://nodered.org" // optional url to make the header text/image a link to this url
},
deployButton: {
type:"simple",
label:"Save",
icon: "/absolute/path/to/deploy/button/image" // or null to remove image
},
menu: { // Hide unwanted menu items by id. see packages/node_modules/@node-red/editor-client/src/js/red.js:loadEditor for complete list
"menu-item-import-library": false,
"menu-item-export-library": false,
"menu-item-keyboard-shortcuts": false,
"menu-item-help": {
label: "Alternative Help Link Text",
url: "http://example.com"
}
},
userMenu: false, // Hide the user-menu even if adminAuth is enabled
login: {
image: "/absolute/path/to/login/page/big/image" // a 256x256 image
},
logout: {
redirect: "http://example.com"
},
palette: {
editable: true, // Enable/disable the Palette Manager
catalogues: [ // Alternative palette manager catalogues
'https://catalogue.nodered.org/catalogue.json'
],
theme: [ // Override node colours - rules test against category/type by RegExp.
{ category: ".*", type: ".*", color: "#f0f" }
]
},
projects: {
enabled: false // Enable the projects feature
}
},
ui : { path: “mydashboard” },
独自のNode Typeはファイルで提供される独自の設定を定義することができます。
functionGlobalContext: { osModule:require('os') }
Functionノード内で以下のようにアクセスすることができます:
var myos = global.get('osModule');
context
のサブプロパティを参照する方法でした。:
context.global.foo = "bar"; var osModule = context.global.osModule;この方法はまだサポートされていますが、非推奨であり、
global.get
/global.set
でのアクセスが推奨されます。この方法で保存されたデータは再起動後には取得できず、サイドバーのコンテキストビューアには表示されません。
Node-RED: Low-code programming for event-driven applications.
Copyright OpenJS Foundation and Node-RED contributors. All rights reserved. The OpenJS Foundation has registered trademarks and uses trademarks. For a list of trademarks of the OpenJS Foundation, please see our Trademark Policy and Trademark List. Trademarks and logos not indicated on the list of OpenJS Foundation trademarks are trademarks™ or registered® trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
The OpenJS Foundation | Terms of Use | Privacy Policy | OpenJS Foundation Bylaws | Trademark Policy | Trademark List | Cookie Policy