webappengine
Version:
A web application platform that can host multiple web apps running with Node.js.
18 lines (12 loc) • 538 B
JavaScript
var path = require('path'),
express = require('express');
module.exports = function(options) {
options = options || {};
var app = express();
var serveStatic = require('serve-static');
var assetPath = path.resolve(__dirname, 'web');
app.enable('case sensitive routing'); // Enable case sensitivity routing: "/Foo" is not equal to "/foo"
app.disable('strict routing'); // Disable strict routing: "/foo" and "/foo/" are treated the same
app.use(options.route, serveStatic(assetPath));
return app;
};