0

How do you get Restify to serve directory listings? It seems to be possible to serve the contents of a directory, but not actually list them.

Fergie
  • 5,933
  • 7
  • 38
  • 42
  • Did you try renaming your existing `index.html` to something (maybe `index1.html`) and see if it does the listing or not? (P.S I haven't tried that though) – David R Nov 04 '16 at 14:11

1 Answers1

0

Use Nodes fs library, namely fs.readdir

fs.readdir(path, function(err, items) { console. log(items); }

Use that inside a resource endpoint to return the listing.

clay
  • 5,917
  • 2
  • 23
  • 21