{"id":24838272,"url":"https://github.com/duckymomo20012/node-red-template","last_synced_at":"2025-10-14T11:32:49.999Z","repository":{"id":37056089,"uuid":"496691431","full_name":"DuckyMomo20012/node-red-template","owner":"DuckyMomo20012","description":"A Node-RED embedded to ExpressJS","archived":false,"fork":false,"pushed_at":"2023-09-08T16:27:26.000Z","size":341,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-09-08T17:54:03.457Z","etag":null,"topics":["expressjs","iot","node-red","template"],"latest_commit_sha":null,"homepage":"https://nodered-template.onrender.com/red/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DuckyMomo20012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-26T16:22:29.000Z","updated_at":"2023-09-08T17:54:03.458Z","dependencies_parsed_at":"2023-02-15T20:01:03.594Z","dependency_job_id":null,"html_url":"https://github.com/DuckyMomo20012/node-red-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Fnode-red-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Fnode-red-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Fnode-red-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DuckyMomo20012%2Fnode-red-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DuckyMomo20012","download_url":"https://codeload.github.com/DuckyMomo20012/node-red-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236470388,"owners_count":19153863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","iot","node-red","template"],"created_at":"2025-01-31T06:10:07.608Z","updated_at":"2025-10-14T11:32:44.678Z","avatar_url":"https://github.com/DuckyMomo20012.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  \u003cimg src=\"https://nodered.org/about/resources/media/node-red-icon-2.svg\" alt=\"logo\" width=\"200\" height=\"auto\" /\u003e\n  \u003ch1\u003eNode-RED Template\u003c/h1\u003e\n\n  \u003cp\u003e\n    A Node-RED embedded into ExpressJS template\n  \u003c/p\u003e\n\n\u003c!-- Badges --\u003e\n\u003cp\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/graphs/contributors\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/contributors/DuckyMomo20012/node-red-template\" alt=\"contributors\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/last-commit/DuckyMomo20012/node-red-template\" alt=\"last update\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/network/members\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/DuckyMomo20012/node-red-template\" alt=\"forks\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/DuckyMomo20012/node-red-template\" alt=\"stars\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/issues/\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/issues/DuckyMomo20012/node-red-template\" alt=\"open issues\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/blob/main/LICENSE\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/license/DuckyMomo20012/node-red-template.svg\" alt=\"license\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch4\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/\"\u003eView Demo\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template\"\u003eDocumentation\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/issues/\"\u003eReport Bug\u003c/a\u003e\n  \u003cspan\u003e · \u003c/span\u003e\n    \u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/issues/\"\u003eRequest Feature\u003c/a\u003e\n  \u003c/h4\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003c!-- Table of Contents --\u003e\n\n# :notebook_with_decorative_cover: Table of Contents\n\n- [About the Project](#star2-about-the-project)\n  - [Screenshots](#camera-screenshots)\n  - [Tech Stack](#space_invader-tech-stack)\n  - [Features](#dart-features)\n  - [Color Reference](#art-color-reference)\n  - [Environment Variables](#key-environment-variables)\n- [Getting Started](#toolbox-getting-started)\n  - [Prerequisites](#bangbang-prerequisites)\n  - [Run Locally](#running-run-locally)\n  - [Running Tests](#test_tube-running-tests)\n  - [Deployment](#triangular_flag_on_post-deployment)\n- [Usage](#eyes-usage)\n  - [Customize Node-RED](#gear-customize-node-red)\n  - [Access Node-RED editor](#fast_forward-access-node-red-editor)\n  - [Import flow](#inbox_tray-import-flow)\n  - [Node-RED dashboard first setups](#one-node-red-dashboard-first-setups)\n  - [Deploy flow](#rocket-deploy-flow)\n- [Roadmap](#compass-roadmap)\n- [Contributing](#wave-contributing)\n  - [Code of Conduct](#scroll-code-of-conduct)\n- [FAQ](#grey_question-faq)\n- [License](#warning-license)\n- [Contact](#handshake-contact)\n- [Acknowledgements](#gem-acknowledgements)\n\n\u003c!-- About the Project --\u003e\n\n## :star2: About the Project\n\n\u003c!-- Screenshots --\u003e\n\n### :camera: Screenshots\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://placehold.co/600x400?text=Your+Screenshot+here\" alt=\"screenshot\" /\u003e\n\u003c/div\u003e\n\n\u003c!-- TechStack --\u003e\n\n### :space_invader: Tech Stack\n\n\u003cdetails\u003e\n  \u003csummary\u003eClient\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"https://www.javascript.com/\"\u003eJavascript\u003c/a\u003e\u003c/li\u003e\n    \u003cli\u003e\u003ca href=\"https://nodered.org/\"\u003eNode-RED\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eServer\u003c/summary\u003e\n  \u003cul\u003e\n    \u003cli\u003e\u003ca href=\"https://expressjs.com/\"\u003eExpress.js\u003c/a\u003e\u003c/li\u003e\n  \u003c/ul\u003e\n\u003c/details\u003e\n\n\u003c!-- Features --\u003e\n\n### :dart: Features\n\n- Feature 1.\n- Feature 2.\n- Feature 3.\n\n\u003c!-- Color Reference --\u003e\n\n### :art: Color Reference\n\n| Color           | Hex                                                              |\n| --------------- | ---------------------------------------------------------------- |\n| Primary Color   | ![#222831](https://placehold.jp/222831/222831/10x10.png) #222831 |\n| Secondary Color | ![#393E46](https://placehold.jp/393E46/393E46/10x10.png) #393E46 |\n| Accent Color    | ![#00ADB5](https://placehold.jp/00ADB5/00ADB5/10x10.png) #00ADB5 |\n| Text Color      | ![#EEEEEE](https://placehold.jp/EEEEEE/EEEEEE/10x10.png) #EEEEEE |\n\n\u003c!-- Env Variables --\u003e\n\n### :key: Environment Variables\n\nTo run this project, you will need to add the following environment variables to\nyour `.env` file:\n\n- **Node-RED configs:**\n\n  `NODERED_USERNAME`: Username to log in to Node-RED editor.\n\n  `NODERED_PASSWORD`: Password to login to Node-RED editor.\n\nE.g:\n\n```\n# .env\nNODERED_USERNAME=admin\nNODERED_PASSWORD=password\n```\n\n\u003e **Note**: `NODERED_USERNAME` and `NODERED_PASSWORD` is **used for admin\n\u003e user**. You can add other users in the file `bin/www`.\n\nRead more about customizing users and other ways to generate passwords:\n[Securing Node-RED](https://nodered.org/docs/user-guide/runtime/securing-node-red#editor--admin-api-security).\n\n\u003e **Note**: You change tweak Node-RED settings in file `bin/www`.\n\nYou can also check out the file `.env.example` to see all required environment\nvariables.\n\n\u003c!-- Getting Started --\u003e\n\n## :toolbox: Getting Started\n\n\u003c!-- Prerequisites --\u003e\n\n### :bangbang: Prerequisites\n\nThis project uses [pnpm](https://pnpm.io/) as package manager:\n\n```bash\nnpm install --global pnpm\n```\n\n\u003c!-- Run Locally --\u003e\n\n### :running: Run Locally\n\nClone the project:\n\n```bash\ngit clone https://github.com/DuckyMomo20012/node-red-template.git\n```\n\nGo to the project directory:\n\n```bash\ncd node-red-template\n```\n\nInstall dependencies:\n\n```bash\npnpm install\n```\n\nStart the server:\n\n```bash\npnpm start\n```\n\nOR:\n\nRun with `nodemon`:\n\n```bash\npnpm dev\n```\n\n---\n\nAccess server:\n\nThe server will run on: http://localhost:3000/red/\n\n\u003c!-- Running Tests --\u003e\n\n### :test_tube: Running Tests\n\nTo run tests, run the following command:\n\n```bash\npnpm test\n```\n\n\u003c!-- Deployment --\u003e\n\n### :triangular_flag_on_post: Deployment\n\nTo deploy this project to Render:\n\n[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/DuckyMomo20012/node-red-template)\n\n\u003c!-- Usage --\u003e\n\n## :eyes: Usage\n\n\u003c!-- Customize Node-RED --\u003e\n\n### :gear: Customize Node-RED\n\n- You can custom your Node-RED configuration in file `nodered-settings.ts`.\n\n  - `httpAdminRoot`: the root URL for the editor UI. If set to false, all admin\n    endpoints are disabled. This includes both API endpoints and the editor UI. To\n    disable just the editor UI, see the disableEditor property below. Default:\n    `/`.\n\n  - `httpNodeRoot`: the root URL for nodes that provide HTTP endpoints. If set to\n    false, all node-based HTTP endpoints are disabled. Default: `/`.\n\n  - `userDir`: the directory to store all user data, such as flow and credential\n    files and all library data. Default: `$HOME/.node-red`.\n\n  - `flowFile`: the file used to store the flows. Default:\n    `flows_\u003chostname\u003e.json`.\n\n  - `functionGlobalContext`: Function Nodes - a collection of objects to attach\n    to the global function context. For example,\n\n    ```javascript\n    functionGlobalContext: {\n      osModule: require('os');\n    }\n    ```\n\n    can be accessed in a function node as:\n\n    ```javascript\n    var myos = global.get('osModule');\n    ```\n\n  - `adminAuth`: enables user-level security in the editor and admin API. See\n    [Securing\n    Node-RED](https://nodered.org/docs/user-guide/runtime/securing-node-red) for\n    more information.\n\n- This template configure these settings:\n\n  ```javascript\n  // nodered-settings.ts\n  const settings = {\n    httpAdminRoot: '/red',\n    httpNodeRoot: '/api',\n    userDir: './.node-red/',\n    flowFile: 'flows.json',\n    functionGlobalContext: {}, // enables global context\n    adminAuth: {\n      type: 'credentials',\n      users: [\n        // This is admin user credentials\n        {\n          username: process.env.NODERED_USERNAME || 'admin',\n          password: bcryptjs.hashSync(\n            process.env.NODERED_PASSWORD || 'password',\n            8,\n          ),\n          permissions: '*',\n        },\n      ],\n    },\n  };\n  ```\n\n\u003e **Note**: Read more about Node-RED configuration: [Runtime\n\u003e Configuration](https://nodered.org/docs/user-guide/runtime/configuration).\n\n\u003c!-- Access Node-RED editor --\u003e\n\n### :fast_forward: Access Node-RED editor\n\n- Go to `http://localhost:3000/red/` to view the Node-RED editor.\n\n- Go to `http://localhost:3000/api/ui/` to view web UI (from\n  node-red-dashboard node).\n\n\u003e **Note**: Remember to deploy your flow before accessing node routes.\n\n\u003c!-- Import flow --\u003e\n\n### :inbox_tray: Import flow\n\n- Go to the hamburger button on the top right of the editor.\n- Click the `Import` button.\n- Then import file `flows.json` from folder `data`.\n\n\u003c!-- Node-RED dashboard first setups --\u003e\n\n### :one: Node-RED dashboard first setups\n\n- Change the web title in the `dashboard/site` tab (on the right-side panel).\n- Change the web main color theme in the `dashboard/theme` tab.\n\n\u003c!-- Deploy flow --\u003e\n\n### :rocket: Deploy flow\n\n- Click the `Deploy` button in the Node-RED editor to deploy flow.\n- After deploying, your flow will be saved in the `.node-red` folder.\n\n\u003e **Note**: File `flow.json` in the `.node-red` folder will be loaded for the\n\u003e next server run. So you can push this `.node-red` folder to your repo to save\n\u003e your work, instead of importing the file `flow.json` manually.\n\n\u003c!-- Roadmap --\u003e\n\n## :compass: Roadmap\n\n- [x] Todo 1.\n- [ ] Todo 2.\n\n\u003c!-- Contributing --\u003e\n\n## :wave: Contributing\n\n\u003ca href=\"https://github.com/DuckyMomo20012/node-red-template/graphs/contributors\"\u003e\n  \u003cimg src=\"https://contrib.rocks/image?repo=DuckyMomo20012/node-red-template\" /\u003e\n\u003c/a\u003e\n\nContributions are always welcome!\n\n\u003c!-- Code of Conduct --\u003e\n\n### :scroll: Code of Conduct\n\nPlease read the [Code of Conduct](https://github.com/DuckyMomo20012/node-red-template/blob/main/CODE_OF_CONDUCT.md).\n\n\u003c!-- FAQ --\u003e\n\n## :grey_question: FAQ\n\n- Question 1\n\n  - Answer 1.\n\n- Question 2\n\n  - Answer 2.\n\n\u003c!-- License --\u003e\n\n## :warning: License\n\nDistributed under MIT license. See\n[LICENSE](https://github.com/DuckyMomo20012/node-red-template/blob/main/LICENSE)\nfor more information.\n\n\u003c!-- Contact --\u003e\n\n## :handshake: Contact\n\nDuong Vinh - [@duckymomo20012](https://twitter.com/duckymomo20012) -\ntienvinh.duong4@gmail.com\n\nProject Link: [https://github.com/DuckyMomo20012/node-red-template](https://github.com/DuckyMomo20012/node-red-template).\n\n\u003c!-- Acknowledgments --\u003e\n\n## :gem: Acknowledgements\n\nHere are useful resources and libraries that we have used in our projects:\n\n- [Node-RED](https://nodered.org/): A powerful tool to build IoT applications.\n- [Awesome Readme Template](https://github.com/Louis3797/awesome-readme-template):\n  A detailed template to bootstrap your README file quickly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckymomo20012%2Fnode-red-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fduckymomo20012%2Fnode-red-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fduckymomo20012%2Fnode-red-template/lists"}