nodeapps/http-server — pull request #27 by indexzero (2012-11-10 13:21:32+00:00)
Title: Support serving files with default extension 

Adds ability to serve files with default extension both from the `http-server` binary and programmatically.

**http-server binary**
```
#
# A request to /a-file will also try to serve /a-file.html
#
http-server /path/to/public -e

#
# A request to /a-file will also try to server /a-file.json
#
http-server /path/to/public -e json
```

**programmatic usage**
``` js
//
// A request to /a-file will also try to serve /a-file.html
//
var server = require('http-server).createServer({
root: '/path/to/public',
ext: true
});

//
// A request to /a-file will also try to serve /a-file.json
//
var server = require('http-server).createServer({
root: '/path/to/public',
ext: 'json'
});
```