{"id":20307148,"url":"https://github.com/jadbox/node-box","last_synced_at":"2026-06-06T12:31:06.382Z","repository":{"id":24837658,"uuid":"28252405","full_name":"jadbox/node-box","owner":"jadbox","description":"Loads Node.js modules into a non-blocking child-processes with messaging passing.","archived":false,"fork":false,"pushed_at":"2014-12-21T19:33:05.000Z","size":208,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T07:32:12.562Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://twitter.com/jadbox","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"apache/incubator-airflow","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jadbox.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}},"created_at":"2014-12-20T01:00:52.000Z","updated_at":"2015-01-14T16:15:03.000Z","dependencies_parsed_at":"2022-08-23T07:31:18.182Z","dependency_job_id":null,"html_url":"https://github.com/jadbox/node-box","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jadbox/node-box","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadbox%2Fnode-box","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadbox%2Fnode-box/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadbox%2Fnode-box/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadbox%2Fnode-box/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jadbox","download_url":"https://codeload.github.com/jadbox/node-box/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jadbox%2Fnode-box/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33983046,"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-06T02:00:07.033Z","response_time":107,"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":[],"created_at":"2024-11-14T17:16:26.139Z","updated_at":"2026-06-06T12:31:06.367Z","avatar_url":"https://github.com/jadbox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-Box\nBy: Jonathan Dunlap\n12/21/2014\n\nThis is a Node library that dynamically loads module JS files and uses a two-way communication channel. Each client module runs in its own complete and sandboxed process, and it is blocking-free from other running modules.\n\n\n## Features\n- Runs each module in its own Node process\n- Client modules are proper child-processes to the host, aiding monitoring and debugging.\n- Modules have a full node environment, including stdout.\n- Modules run in a complete isolated environment and cannot conflict in local or global namespaces.\n- Modules and Host can communicate bi-directionally\n- Modules can throw errors to the host.\n- The host can directly start and kill modules dynamically.\n\n\n## Example\n\nFor a full example see [example/main.js](https://github.com/jadbox/node-box/blob/master/example/main.js)\n\nExample Host:\n```javascript\n// Instance the BoxHost to load clients\nvar host = new BoxHost();\n\n// Load and start Game2.js module\n// Register the file to ID 'game2'\n// Register the error handler onError\nhost.start('game1', __dirname + '/Game1.js', onError);\n\n// Register message handler\nhost.on('game1', function(msg) { } );\n\n// Call client module handler with parameters:\nhost.send('game1', 'callMe', [2, true]);\n\n// Kill the client, as it will continue to run otherwise.\nhost.kill('game1');\n\n```\nExample Client (file: Game1.js):\n```javascript\n// Set the API handles\nvar api = {\n\t'callMe':callMe\n}\n// Instance the client lib with the API handles\nvar client = new BoxClient(api);\n\n// Send a message to the host\nclient.send(\"Hello Host!\");\n\n// Send an error message to the host\nclient.throw(\"!!!false alarm!!!\");\n\n// This handle gets called for host messages\nfunction callMe(a) {\n\tconsole.log(\"Game1 was called with one param: \" + a);\n}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadbox%2Fnode-box","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjadbox%2Fnode-box","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjadbox%2Fnode-box/lists"}