Skip to content

Commit

Permalink
Render directory already
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed May 21, 2018
1 parent 155b50e commit fe372e2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const minimatch = require('minimatch');
const pathToRegExp = require('path-to-regexp');
const mime = require('mime/lite');

// Other
const template = require('../views/directory.js');

const getHandlers = methods => {
const {stat, createReadStream} = fs;

Expand Down Expand Up @@ -313,6 +316,7 @@ module.exports = async (request, response, config = {}, methods = {}) => {
return;
}


response.statusCode = 200;
response.end('Directory');
response.end(template({directory: 'mask'}));
};

0 comments on commit fe372e2

Please sign in to comment.