@@ -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
|
||||
|
||||
Reference in New Issue
Block a user