Search code examples
racerjs

Derby.js in an off-line packaged Chrome App?


I've been working with AngularJS in an off-line packaged Chrome App.

I came across off-line sync requirements that points to ShareJS and RacerJS.

Is it possible to use Derby.js in an off-line packaged Chrome App?

AngularJS example App.

Possible CSP issue.

Thanks!

Mike


Solution

  • It is possible using the derby-standalone module.

    You can see an example of client-side only Derby in CodePen and another example which uses derby for only part of the content of a site.

    With derby standalone you can put a few lines of code to initialize a client-side app and render templates/components in the browser:

    var app = derby.createApp();
    app.registerViews();
    var page = app.createPage();
    document.body.appendChild(page.getFragment('body'));