Is this safe to use require(\"path\").join to concatenate URLs, for example:
require(\"path\").join
require(\"path\").join(\"http://example.com\", \"ok\"); //returns
No! On Windows path.join will join with backslashes. HTTP urls are always forward slashes.
path.join
How about
> ["posts", "2013"].join("/") 'posts/2013'