Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spolu/node-shell
Atom Shell bindings for nodeJS
https://github.com/spolu/node-shell
Last synced: about 2 months ago
JSON representation
Atom Shell bindings for nodeJS
- Host: GitHub
- URL: https://github.com/spolu/node-shell
- Owner: spolu
- License: mit
- Created: 2014-07-18T17:21:18.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-07-19T19:31:25.000Z (over 10 years ago)
- Last Synced: 2024-10-23T03:04:18.840Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 476 KB
- Stars: 57
- Watchers: 6
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
node-shell
==========`node-shell` lets you create cross-platform native GUI apps based on [atom-shell](https://github.com/atom/atom-shell),
straight out of the box from NodeJS, with no dependency or build phase required.### Try it yourself right now
```
$ npm install node-shell
$ node
> require('node-shell')(function(err, api) {
var win = new api.BrowserWindow({}).loadUrl('http://google.com');
});
```
This works out of the box on `Windows`, `OSX` and `Linux` with vanilla nodeJS installations.![ScreenShot](http://i.imgur.com/4pRqXwQ.png)
### Implementation details
When `npm install` is invoked, `node-shell` downloads a packaged release of `atom-shell`
for the current platform and replaces the default app with a wrapper that exposes the
`atom-shell` API through (json)RPC over UNIX sockets.Using the `node-shell` library, node apps can create rich native apps powered by `atom-shell`,
without the need to build or rebuild anything (including native addons).When spawning a new shell from your module, the `node-shell` library spawns an `atom-shell`
running the wrapper app and opens an RPC channel with it to let you interact with the API.```
+-------------------------+ +-----------------------+
| node | | atom-shell |
+-------------------------- +-----------------------+
+--------+ +------------+ +---------+ +----------+
| | +-+ node-shell | <--------> | wrapper +--+ atom |
| | | +------------+ RPC | app | | api |
| your +-+ +---------+ +----+-----+
| app.js | | +------------+ +--------+---+
| | +-+ other deps | | |
| | +------------+ +---+--+ +---+--+
| | ... | winA | | winB | ...
+--------+ +------+ +------+
```