https://github.com/strd6/system-client
Client lib to run apps on ZineOS and proxy messages to the OS through Postmaster
https://github.com/strd6/system-client
Last synced: 10 months ago
JSON representation
Client lib to run apps on ZineOS and proxy messages to the OS through Postmaster
- Host: GitHub
- URL: https://github.com/strd6/system-client
- Owner: STRd6
- Created: 2017-10-04T23:27:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-11T04:41:34.000Z (about 7 years ago)
- Last Synced: 2025-08-21T06:27:09.289Z (10 months ago)
- Language: CoffeeScript
- Size: 799 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
System Client
=============
Client lib to run apps on ZineOS and proxy messages to the OS through Postmaster.
Apps that want to integrate with ZineOS can use System Client to connect to
ZineOS through the system interface.
System Client includes the UI library so apps can use that as well.
Usage
-----
Setup:
```coffee
SystemClient = require "system-client"
{application, system, UI} = SystemClient()
system.ready()
.then -> # Connected to ZineOS
.catch -> # Not connected to ZineOS
```
Making ZineOS system calls:
```coffee
system.writeFile(path, blob)
```
The system calls are sent to the parent frame through postmessage. All arguments
need to be able to survive the structured clone algorithm. A promise is returned
that will be fulfilled with the result of the remote ivnocation or rejected with
an error.