{"id":15314658,"url":"https://github.com/unframework/remote-control","last_synced_at":"2025-10-09T00:32:28.036Z","repository":{"id":29057140,"uuid":"32584912","full_name":"unframework/remote-control","owner":"unframework","description":"Call functions on node server from browser web UI for quick prototyping","archived":true,"fork":false,"pushed_at":"2018-11-07T12:28:00.000Z","size":29,"stargazers_count":10,"open_issues_count":8,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-04-25T00:34:52.309Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unframework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-20T13:22:26.000Z","updated_at":"2023-01-28T11:49:10.000Z","dependencies_parsed_at":"2022-07-21T03:30:30.246Z","dependency_job_id":null,"html_url":"https://github.com/unframework/remote-control","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fremote-control","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fremote-control/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fremote-control/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unframework%2Fremote-control/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unframework","download_url":"https://codeload.github.com/unframework/remote-control/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877247,"owners_count":16554912,"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":[],"created_at":"2024-10-01T08:46:33.726Z","updated_at":"2025-10-09T00:32:22.770Z","avatar_url":"https://github.com/unframework.png","language":"JavaScript","readme":"# remote-control\n\nCall functions on NodeJS server directly from client-side code in the browser UI for quick prototyping and local deployments. Use promises to get return value. Supports server push (by wrapping readable streams returned by server code).\n\nIf you are quickly prototyping a new app with both in-browser and server-side components, the last thing you want to worry about is setting up Express routes, the main entry-point HTML file, encoding/decoding values, dealing with XHR... This module is designed to help get going without all the boilerplate, as just a simple live \"tunnel\" between the browser and server worlds.\n\nThe easiest way to get started is to just install as a global utility:\n\n```sh\nnpm install -g remote-control\n```\n\nThen put client-side in `index.js`:\n\n```js\nvar server = require('__server')(); // Browserified by default, but that's optional\n\nserver.helloWorld('foo value', 'bar value').then(function (baz) {\n    document.body.appendChild(\n        document.createTextNode('responded with: ' + baz)\n    );\n});\n```\n\nAnd server-side code in `server.js`:\n\n```js\nmodule.exports = {\n    helloWorld: function (foo, bar) {\n        console.log('invoked helloWorld with', foo, 'and', bar);\n\n        return 'baz value';\n    }\n};\n```\n\nThen run:\n\n```sh\nremote-control server.js index.js\n```\n\nAnd open http://localhost:3000/ in your browser. That's it!\n\nThe `remote-control` utility is a sandbox development server. It automatically [browserifies](http://browserify.org/) the client-side code and presents it to the browser inside a ready-made page. It works much like the excellent [Beefy](http://didact.us/beefy/) runner, but adds the necessary plumbing to directly call functions server-side.\n\n## To Do\n\n* document Express middleware mode\n* implement connection restart\n* document server push features\n* extend server push features? add time out as well\n* allow auto-reloading code\n* add code checksumming?\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Fremote-control","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funframework%2Fremote-control","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funframework%2Fremote-control/lists"}