Friday, 15 April 2011

javascript - App js code (appjs.serveFilesFrom) to serve static files from a directory not working? -



javascript - App js code (appjs.serveFilesFrom) to serve static files from a directory not working? -

i'm using appjs (with nodejs + chromium) in desktop app. need include js files , phone call functions defined in files in app.js file (mainly in menu created using app.createmenu(..) ). tried include files using below code given in http://appjs.org/, http://comments.gmane.org/gmane.comp.lang.javascript.nodejs/45736, it's not working:

var appjs = require('appjs'); // serve static files directory appjs.servefilesfrom(__dirname + '/content');

is there else need added create code working? please help me.

thanks in advance.

.servefilesfrom() nil more serve static assets in content directory. static, means css, html, , images client-side javascript.

you still have handle requests , dependency management on own. simple plenty grasp, though.

a way go start off developing app using 1 of existing starter bundle distributables, available on appjs homepage (make sure take right 1 operating system), have boilerplate code , configuration written you.

javascript appjs

No comments:

Post a Comment