addDirectory
Add a directory to serve at a URL route prefix. You can call it before or after the service starts; the route serves from the next request.
Parameters
route
URL prefix, for example '/docs'. A leading / is added if missing.
directory
Local directory path to serve.
Returns
void
Throws an Error if the directory does not exist or the path is not a directory.