diff --git a/README.md b/README.md index 4229450..c4e2e35 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,25 @@ Minimal integrated ecosystem for making "desktop apps" from websites easily usin +## IPC API +Gluon has an easy to use, but powerful asynchronous IPC API. Example: +```js +// In your website's JS +const reply = await Gluon.ipc.send('my type', { more: 'data' }); +console.log(reply); // { give: 'back', different: 'stuff' } +``` + +```js +// In your Node backend +import * as Gluon from '...'; +const Window = await Gluon.open(...); + +Window.ipc.on('my type', data => { // { more: 'data' } + return { give: 'back', different: 'stuff' }; +}); +``` + +
## Comparisons