UNPKG

538 BJavaScriptView Raw
1var path = require('path'),
2 express = require('express');
3
4module.exports = function(options) {
5 options = options || {};
6
7 var app = express();
8 var serveStatic = require('serve-static');
9 var assetPath = path.resolve(__dirname, 'web');
10
11 app.enable('case sensitive routing'); // Enable case sensitivity routing: "/Foo" is not equal to "/foo"
12 app.disable('strict routing'); // Disable strict routing: "/foo" and "/foo/" are treated the same
13
14 app.use(options.route, serveStatic(assetPath));
15
16 return app;
17};