restify/node-restify

serveStatic is non-intuitive

Ouverte

#535 ouverte le 18 févr. 2014

 (33 commentaires) (0 réaction) (0 personne assignée)JavaScript (983 forks)batch import
BugHelp WantedServe

Métriques du dépôt

Stars
 (10 695 étoiles)
Métriques de merge PR
 (Métriques PR en attente)

Description

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...

Guide contributeur