restify/node-restify

serveStatic is non-intuitive

Open

#535 建立於 2014年2月18日

在 GitHub 查看
 (33 留言) (0 反應) (0 負責人)JavaScript (983 fork)batch import
BugHelp WantedServe

倉庫指標

Star
 (10,695 star)
PR 合併指標
 (平均合併 3小時 56分鐘) (30 天內合併 2 個 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...

貢獻者指南