Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

SDK on top of nodejs to build desktop apps using HTML5/CSS/JS

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 bin
Octocat-spinner-32 cli
Octocat-spinner-32 examples
Octocat-spinner-32 lib
Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .npmignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 appjs.png
Octocat-spinner-32 binding.gyp
Octocat-spinner-32 index.js
Octocat-spinner-32 package.json
README.md

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.

Something went wrong with that request. Please try again.