LOG IN SIGN UP
Documentation

req.url.dirname

The directories specified in a URL.

For example, in the request www.example.com/1/hello.gif?foo=bar, req.url.dirname will contain /1.

In the request www.example.com/5/inner/hello.gif?foo=bar, req.url.dirname will contain /5/inner.