restify/node-restify

serveStatic is non-intuitive

Open

#535 aperta il 18 feb 2014

Vedi su GitHub
 (33 commenti) (0 reazioni) (0 assegnatari)JavaScript (983 fork)batch import
BugHelp WantedServe

Metriche repository

Star
 (10.695 star)
Metriche merge PR
 (Merge medio 3h 56m) (2 PR mergiate in 30 g)

Descrizione

KISS: Keep it simple stupid. Please make it this for static files plugins, all people have the same problem, in my ofice 5 persons give me the same as bug!!

if you assign this:

server.get(/\/docs\/public\/?.*/, restify.serveStatic({
  directory: './public'
}));

will mean that if you get the url "domain.com/docs/public" this will be load the content of "public" folder. END. Not at prefix for the entire route path... and your fairy tales... Kiss men, kiss...

Guida contributor