(function(app) {
    var m = app.add_module("foo");

    m.actions = function() {
        
    }

    m.run();
})(myapp);