index + default args
This commit is contained in:
1 parent
0c005712a1
commit
f93c258d14
1 file changed
+1
-3
+1
-3
@@ -45,9 +45,7 @@ export function accepts(routes, def) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function index(filename) {
|
export function index(filename = config['defaultIndex']) {
|
||||||
if (!filename) filename = config['defaultIndex'];
|
|
||||||
|
|
||||||
return function *() {
|
return function *() {
|
||||||
this.type = 'text/html';
|
this.type = 'text/html';
|
||||||
this.body = fs.createReadStream(filename);
|
this.body = fs.createReadStream(filename);
|
||||||
|
|||||||
Reference in new issue
Block a user