diff --git a/src/routes/index.js b/src/routes/index.js index 74bbdccf..b19781ed 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -45,9 +45,7 @@ export function accepts(routes, def) { }; } -export function index(filename) { - if (!filename) filename = config['defaultIndex']; - +export function index(filename = config['defaultIndex']) { return function *() { this.type = 'text/html'; this.body = fs.createReadStream(filename);