Use express to link urls to window locations?
I want to write something that automatically...开发者_运维问答
example.com/woot
-> example.com/#woot
Thanks!
var parsed = url.parse(incomingUrl);
parsed.pathname.replace(/\//, "/#");
var outgoingUrl = url.format(parsed);
Why you want to do this is another question
精彩评论