mirror of
https://github.com/socketio/socket.io.git
synced 2026-04-30 03:00:39 -04:00
Leverage static middleware in mounted /test.
This commit is contained in:
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user