{"id":51005347,"url":"https://github.com/interopio/rest-config-example-node-js","last_synced_at":"2026-06-20T20:01:56.594Z","repository":{"id":96745569,"uuid":"254388161","full_name":"InteropIO/rest-config-example-node-js","owner":"InteropIO","description":"io.Connect Rest Configuration Service Example in NodeJS- with support for applications and layouts","archived":false,"fork":false,"pushed_at":"2026-02-20T16:12:45.000Z","size":773,"stargazers_count":3,"open_issues_count":8,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-02-20T20:57:14.478Z","etag":null,"topics":["docs-demos","io-connect-desktop","nodejs","rest","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/InteropIO.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-09T14:05:59.000Z","updated_at":"2026-02-17T11:53:10.000Z","dependencies_parsed_at":"2025-03-31T21:27:59.025Z","dependency_job_id":"4d6e4dec-da49-4527-b3fe-dc19507d9568","html_url":"https://github.com/InteropIO/rest-config-example-node-js","commit_stats":null,"previous_names":["interopio/rest-config-example-node-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/InteropIO/rest-config-example-node-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteropIO%2Frest-config-example-node-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteropIO%2Frest-config-example-node-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteropIO%2Frest-config-example-node-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteropIO%2Frest-config-example-node-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InteropIO","download_url":"https://codeload.github.com/InteropIO/rest-config-example-node-js/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InteropIO%2Frest-config-example-node-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34583589,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docs-demos","io-connect-desktop","nodejs","rest","typescript"],"created_at":"2026-06-20T20:01:53.506Z","updated_at":"2026-06-20T20:01:56.558Z","avatar_url":"https://github.com/InteropIO.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# io.Connect Configuration Service Example\r\n\r\n⚠️ **Warning:** This is a sample implementation intended for demonstration purposes only. Several aspects would require enhancement for production use in a multi-user environment. Most notably, this sample lacks proper user management and authentication. In a production system, requests should be segregated by user identity, ensuring users can only access their own layouts and data. Currently, this example returns all layouts to any connecting user regardless of identity, which would be inappropriate for a secure multi-user application.\r\n\r\n[**io.Connect Desktop**](https://docs.interop.io/desktop/getting-started/what-is-io-connect-desktop/general-overview/index.html) uses application, layout, system and other configurations defined on the local machine, but can also be reconfigured to fetch them from a REST service.\r\n\r\nThis example project shows how to run a Node.js REST service that provides configuration stores for **io.Connect Desktop**.\r\n\r\n## Configuration and Start\r\n\r\nTo start:\r\n\r\n```cmd\r\n# install the dependencies\r\n$ npm i           \r\n\r\n# development\r\n$ npm run start\r\n\r\n# watch mode\r\n$ npm run start:dev\r\n\r\n# production mode\r\n$ npm run start:prod\r\n```\r\n\r\nThis will start the service on port 8004 (by default). You can override the port by setting the `SERVER_PORT` environment variable, as described later in the document.\r\n\r\n## REST API Documentation\r\n\r\nOnce the server is running, you can:\r\n* view the Swagger UI by opening [http://localhost:8004/api](http://localhost:8004/api)\r\n* view the Swagger definition by opening [http://localhost:8004/api-json](http://localhost:8004/api-json) or [http://localhost:8004/api-yaml](http://localhost:8004/api-yaml)\r\n\r\n\r\n## io.Connect Desktop Configuration\r\n\r\nTo enable fetching configuration definitions from the REST service, you need to edit your local configuration files located in the `%LOCALAPPDATA%\\interop.io\\io.Connect Desktop\\Desktop\\config` folder.\r\n\r\n### Applications\r\n\r\nTo enable fetching application configurations from the REST store, find the `\"appStores\"` top-level key in the `system.json` file and add a new entry (or replace existing entries) with the following configuration:\r\n\r\n```json\r\n{\r\n\r\n    \"appStores\": [\r\n        {\r\n            \"type\": \"rest\",\r\n            \"details\": {\r\n                \"url\": \"http://localhost:8004/apps/\"\r\n            }\r\n        }\r\n    ]\r\n}\r\n```\r\n\r\n### Layouts\r\n\r\nTo enable fetching layouts from the REST store, find the `\"layouts\"` top-level key in the `system.json` file and edit the `\"store\"` property - change the `\"type\"` to `\"rest\"` and assign the URL of the service to the `\"restURL\"`:\r\n\r\n```json\r\n{\r\n    \"layouts\": {\r\n        \"store\": {\r\n            \"type\": \"rest\",\r\n            \"restURL\": \"http://localhost:8004/\"\r\n        }\r\n    }\r\n}\r\n```\r\n\r\n### Application Preferences\r\n\r\nTo enable reading and storing application preference from the REST store, find the `\"applicationPreferences\"` top-level key in the `system.json` file and edit the `\"store\"` property - change the `\"type\"` to `\"rest\"` and assign the URL of the service to the `\"restURL\"`:\r\n\r\n```json\r\n{\r\n    \"applicationPreferences\": {\r\n        \"store\": {\r\n            \"type\": \"rest\",\r\n            \"restURL\": \"http://localhost:8004/prefs\"\r\n        }\r\n    }\r\n}\r\n```\r\n### System and Other Configurations\r\n\r\nTo enable io.Connect Desktop to fetch system configurations from a remote location, use the \"remoteConfig\" top-level key of the `gilding.json` configuration file:\r\n\r\n```json\r\n{\r\n    \"remoteConfig\": {\r\n        \"enabled\": true,\r\n        \"url\": \"http://localhost:8004/configs\",\r\n        \"wipeFolder\": true\r\n    }\r\n} \r\n```\r\n\r\n## REST Service Env Variables\r\n\r\n* SERVER_PORT - The port on which the REST service will run. Defaults to 8004\r\n* APPS_FOLDER - Specifies the directory containing application definitions in JSON format. By default, it points to the `configuration\\apps` folder, but the environment variable `APPS_FOLDER` can be used to override * this setting.\r\n* LAYOUTS_FOLDER - Specifies the directory for reading and storing layout definitions. By default, this is set to the `configuration\\layouts` folder, but the environment variable `LAYOUTS_FOLDER` can be used to override this setting.\r\n* PREFS_FOLDER - Specifies the directory used for reading and storing application preferences. By default, it points to the `configuration\\prefs` folder, but the environment variable `PREFS_FOLDER` can be used to override this setting.\r\n* CONFIGS_FOLDER - Specifies the directory for storing system configurations. By default, it points to the `configuration\\configs` folder, but the environment variable `CONFIGS_FOLDER` can be used to override this setting.\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteropio%2Frest-config-example-node-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finteropio%2Frest-config-example-node-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteropio%2Frest-config-example-node-js/lists"}