diff --git a/README.md b/README.md index caeb7f50..c21db282 100644 --- a/README.md +++ b/README.md @@ -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