0.2.5 • Published 10 years ago
em-webfiles v0.2.5
em-webfiles
http files middleware for ee-webservice
installation
npm install em-webfiles
build status
var Webfiles = require('ee-webfiles')
, FSLoader = require();
var files = new Webfiles()
, loader = new FSLoader({path: '/path/to/files'});
loader.on('load', function(err) {
files.use(loader);
});
// serve index.html, index.json & default.htm files as directory index
files.addDirectoryIndex( "default.htm" );
webservice.use(files);