(file, req, res, next)
| 143 | } |
| 144 | |
| 145 | function serveNormal(file, req, res, next) { |
| 146 | fs.stat(file, function fileStat(err, stats) { |
| 147 | if (!err && stats.isDirectory() && opts.default) { |
| 148 | // Serve an index.html page or similar |
| 149 | var filePath = path.join(file, opts.default); |
| 150 | fs.stat(filePath, function dirStat(dirErr, dirStats) { |
| 151 | serveFileFromStats( |
| 152 | filePath, |
| 153 | dirErr, |
| 154 | dirStats, |
| 155 | false, |
| 156 | req, |
| 157 | res, |
| 158 | next |
| 159 | ); |
| 160 | }); |
| 161 | } else { |
| 162 | serveFileFromStats(file, err, stats, false, req, res, next); |
| 163 | } |
| 164 | }); |
| 165 | } |
| 166 | |
| 167 | function serve(req, res, next) { |
| 168 | var file; |
no test coverage detected