0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Clarify what the private directory is

This commit is contained in:
Ginetom 2019-02-14 09:35:27 -03:00 committed by Loïc Hoguin
parent b86e2839bc
commit cd9b04792c
No known key found for this signature in database
GPG key ID: 8A9DF795F6FED764

View file

@ -43,12 +43,12 @@ which means that your route must end with a `[...]` pattern
for it to work. All files are served, including the ones that for it to work. All files are served, including the ones that
may be found in subfolders. may be found in subfolders.
You can specify the directory relative to an application's You can specify the directory relative to the application's
private directory. private directory (e.g. `my_app/priv`).
The following rule will serve any file found in the application The following rule will serve any file found in the `my_app`
`my_app`'s priv directory inside the `static/assets` folder application's private directory in the `my_app/priv/static/assets`
whenever the requested path begins with `/assets/`: folder whenever the requested path begins with `/assets/`:
[source,erlang] [source,erlang]
{"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets"}} {"/assets/[...]", cowboy_static, {priv_dir, my_app, "static/assets"}}