From 91de0cb7ad8a9f11ddaeae570753eff86aaafb60 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Tue, 18 Oct 2011 14:00:51 -0700 Subject: [PATCH] Leverage static middleware in mounted `/test`. --- support/test-runner/app.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/support/test-runner/app.js b/support/test-runner/app.js index 167430ae..e7593a22 100644 --- a/support/test-runner/app.js +++ b/support/test-runner/app.js @@ -41,6 +41,7 @@ var testsPorts = {}; app.configure(function () { app.use(stylus.middleware({ src: __dirname + '/public' })) app.use(express.static(__dirname + '/public')); + app.use('/test', express.static(__dirname + '/../../test')); app.set('views', __dirname); app.set('view engine', 'jade'); }); @@ -56,14 +57,6 @@ app.get('/', function (req, res) { }); }); -/** - * Sends test files. - */ - -app.get('/test/:file', function (req, res) { - res.sendfile(path.normalize(__dirname + '/../../test/' + req.params.file)); -}); - /** * App listen. */