https://github.com/hlfshell/mirrored
Just an idea - automagic web socket exposure for easy remote code execution
https://github.com/hlfshell/mirrored
Last synced: about 1 year ago
JSON representation
Just an idea - automagic web socket exposure for easy remote code execution
- Host: GitHub
- URL: https://github.com/hlfshell/mirrored
- Owner: hlfshell
- Created: 2018-05-02T21:00:48.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-03T21:22:09.000Z (about 8 years ago)
- Last Synced: 2025-02-09T17:14:51.830Z (over 1 year ago)
- Language: TypeScript
- Size: 10.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mirrored
The idea: automagic web socket exposure for easy remote code execution
TLDR; I had a project where I created an onboard API interface for a custom piece of hardware in node.js - the problem was that I knew I would have to generate a websockets API for it in order to bridge multiple units across a network connection. It occured to me that in [serial-synpase-socket](https://github.com/hlfshell/serial-synapse-socket) I had a module that would automatically expose a [serial-synapse](https://github.com/hlfshell/serial-synapse) object. This wouldn't work here, since this was a fresh new API and no serial control was present.
So I started experimenting around with it. If you're reading this README, that means I didn't advance it past the idea stage - just like a bajillion other ideas.
The goal is to have a `MirrorHost` object- you then feed it objects which it dynamically creates an API for. You then create a `MirrorClient` object on the client computer, connecting it to the host. The `MirrorHost` will then keep the `MirrorClient` synced, expose in JS object functions, and handle passing the execution of the host's actual object to the cloned object on the client.