0.1.0 • Published 10 years ago

chrome-app v0.1.0

Weekly downloads
3
License
ISC
Repository
github
Last release
10 years ago

chrome-app

Launch a no-UI Chrome App from nodejs. Extracted from Rod Vagg's morkdown project.

install

npm install --save chrome-app

example

http.createServer(function(request, response) {
  response.writeHead(200, {"Content-Type": "text/plain"});
  response.end("Hello World\n");
}).listen(null, function(err, res) {
  chromeApp(this.address().address + ':' + this.address().port);
});

api

chromeApp(url, [name])

Given a URL, open a new Chrome window with that URL as an app. The window will close when the process exits, and the process will exit when the window is closed.

name, if given, is a string representing a directory under ~ where Chrome's user data will be stored. In practical terms, it's your app name.