restify/node-restify

serveStatic is non-intuitive

开放

#535 创建于 2014年2月18日

 (33 条评论) (0 个反应) (0 位负责人)JavaScript (983 个派生)batch import
BugHelp WantedServe

仓库指标

星标
 (10,695 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

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

贡献者指南