docs: add express.static to the express example

closes #64
This commit is contained in:
Douglas Christopher Wilson
2017-09-29 00:20:54 -04:00
parent 76e3c3af41
commit 45dbe4f219

View File

@@ -127,8 +127,12 @@ var serveIndex = require('serve-index')
var app = express()
// Serve URLs like /ftp/thing as public/ftp/thing
app.use('/ftp', serveIndex('public/ftp', {'icons': true}))
app.listen()
// The express.static serves the file contents
// The serveIndex is this module serving the directory
app.use('/ftp', express.static('public/ftp'), serveIndex('public/ftp', {'icons': true}))
// Listen
app.listen(3000)
```
## License