fix minify route path; update deprecated calls

This commit is contained in:
Tom Hunkapiller 2015-04-10 05:52:58 -05:00
parent 4385598de6
commit de67714cf8
3 changed files with 4 additions and 4 deletions

View File

@ -13,7 +13,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
// Minify will serve static files compressed (minify enabled). It also has
// file-specific hacks for ace/require-kernel/etc.
args.app.all('/static/:filename', minify.minify);
args.app.all('/static/:filename(*)', minify.minify);
// Setup middleware that will package JavaScript files served by minify for
// CommonJS loader on the client-side.

View File

@ -50,7 +50,7 @@ exports.expressCreateServer = function (hook_name, args, cb) {
args.app.get('/tests/frontend/*', function (req, res) {
var filePath = url2FilePath(req.url);
res.sendfile(filePath);
res.sendFile(filePath);
});
args.app.get('/tests/frontend', function (req, res) {

View File

@ -57,10 +57,10 @@ exports.basicAuth = function (req, res, next) {
res.header('WWW-Authenticate', 'Basic realm="Protected Area"');
if (req.headers.authorization) {
setTimeout(function () {
res.send(401, 'Authentication required');
res.status(401).send('Authentication required');
}, 1000);
} else {
res.send(401, 'Authentication required');
res.status(401).send('Authentication required');
}
}));
}