Skip to content

Add Node in the browser global object

franck34 edited this page Aug 22, 2012 · 1 revision
var appjs = require('appjs');

appjs.router.get('/', function(request, response){
  response.send(200, 'hello');
});

var window = appjs.createWindow();

window.on('ready', function(){
  window.frame.show();
  window.require = require;
  window.process = process;
  window.module = module;
});