appjs

AppJS is a SDK on top of nodejs to develop desktop applications using HTML/CSS/JS

  • appjs

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
appjs
0.0.2011 years ago12 years agoMinified + gzip package size for appjs in KB

Readme

AppJS
AppJS AppJS is an SDK to develop desktop applications using node. Or at least it is going to be!
The goal is to facilitate native app development using tools every developer is familiar with nowadays: HTML/CSS/JS
Attention: You should not use AppJS before we bump version to v0.1.0, it is under heavy development.
Hello World

How to install

Only Linux version works for now. Pull requests for other platforms are very welcome
Using npm:
$ npm install appjs
Using git:
$ git clone https://github.com/milani/appjs
$ cd appjs/bin
$ ./configure

How to use

There is a complete example in the examples/ folder.
Here is a simple one:
var appjs = require('appjs');

var window;

// Initialize appjs.
    var app = appjs.init();

    // Called when page load finishes.
    app.on("ready",function(){
  console.log("Event Ready called");

  // Runs a script in browser context.
  window.runInBrowser(function(){
    var body = document.body;
    body.style.color="#f60";
  });

  // Show created window ( see below )
  window.show();
});

// Routing:

// you can use a static router:
// app.use(app.staticRouter('./public'));

// or you can handle requests manually:
app.get("/",function(req,res,next){
  res.send("\
  	<html>\
  		<head><title>Hello World</title></head>\
  		<body>Hello World</body>\
  	</html>\
  ")
});

// Creates a new window. Its invisible until window.show() get called.
    window = app.createWindow("appjs://app/",{autoResize:false});

Thanks to

  • Brandon Benvie: He helps me with CEF.
  • Ali Farhadi: He helps me with AppJS.

License

( The MIT License )
Copyright (c) 2012 Morteza Milani and other AppJS contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.