Spaces:
Paused
Paused
Download settings.js from 2Btainment/node-red: direct link, hf CLI and curl.
- Browser
- Download file 2.32 kB
-
https://huggingface.co/spaces/2Btainment/node-red/resolve/main/settings.js
- Command line
-
hf download hf://spaces/2Btainment/node-red/settings.js
-
curl -L -o settings.js https://huggingface.co/spaces/2Btainment/node-red/resolve/main/settings.js
2.32 kB
| /** | |
| * Einswarm Node-RED settings for Hugging Face Space. | |
| * Password hash injected by entrypoint via NODE_RED_ADMIN_PASSWORD_HASH. | |
| */ | |
| const adminUser = process.env.NODE_RED_ADMIN_USER || "admin"; | |
| const adminHash = process.env.NODE_RED_ADMIN_PASSWORD_HASH || ""; | |
| const credentialSecret = | |
| process.env.NODE_RED_CREDENTIAL_SECRET || | |
| process.env.NODE_RED_CREDENTIAL_SECRET_KEY || | |
| ""; | |
| const uiPort = parseInt(process.env.PORT || process.env.NODE_RED_PORT || "1880", 10); | |
| module.exports = { | |
| uiPort, | |
| uiHost: "127.0.0.1", | |
| httpAdminRoot: "/", | |
| httpNodeRoot: "/", | |
| userDir: "/data", | |
| flowFile: process.env.FLOWS || "flows.json", | |
| flowFilePretty: true, | |
| credentialSecret: credentialSecret || undefined, | |
| httpNodeCors: { | |
| origin: "*", | |
| methods: "GET,PUT,POST,DELETE,OPTIONS" | |
| }, | |
| adminAuth: adminHash | |
| ? { | |
| type: "credentials", | |
| users: [ | |
| { | |
| username: adminUser, | |
| password: adminHash, | |
| permissions: "*" | |
| } | |
| ] | |
| } | |
| : undefined, | |
| editorTheme: { | |
| page: { | |
| title: "Einswarm Node-RED", | |
| favicon: "/einswarm/einswarm-logo.png", | |
| css: "/einswarm/einswarm-editor.css", | |
| scripts: ["/einswarm/bmc-loader.js"] | |
| }, | |
| header: { | |
| title: "Einswarm Node-RED", | |
| image: "/einswarm/einswarm-logo.png", | |
| url: "https://huggingface.co/spaces/2Btainment/node-red" | |
| }, | |
| deployButton: { | |
| type: "simple", | |
| label: "Deploy", | |
| icon: null | |
| }, | |
| menu: { | |
| "menu-item-help": { | |
| label: "Einswarm / ANLEITUNG", | |
| url: "https://huggingface.co/spaces/2Btainment/node-red/blob/main/ANLEITUNG.md" | |
| } | |
| }, | |
| userMenu: true, | |
| login: { | |
| image: "/einswarm/einswarm-logo.png" | |
| }, | |
| logout: { | |
| redirect: "https://huggingface.co/spaces/2Btainment/node-red" | |
| }, | |
| projects: { enabled: false }, | |
| codeEditor: { | |
| lib: "monaco", | |
| options: { theme: "vs-dark" } | |
| } | |
| }, | |
| functionGlobalContext: { | |
| einswarm: { brand: "Einswarm", owner: "2Btainment" } | |
| }, | |
| logging: { | |
| console: { level: "info", metrics: false, audit: false } | |
| }, | |
| exportGlobalContextKeys: false, | |
| externalModules: { autoInstall: false }, | |
| // Serve /einswarm/* for any direct asset requests | |
| httpStatic: "/einswarm", | |
| httpStaticRoot: "/einswarm/" | |
| }; | |