0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-15 04:30:25 +00:00

Convert the markdown_middleware example to a release

This commit is contained in:
Loïc Hoguin 2013-10-22 09:10:24 +02:00
parent 4769412daa
commit 36ba174224
9 changed files with 1614 additions and 46 deletions

View file

@ -22,8 +22,8 @@ maybe_generate_markdown(Path) ->
end.
resource_path(Path) ->
{ok, Cwd} = file:get_cwd(),
filename:join([Cwd, "priv", Path]).
PrivDir = code:priv_dir(markdown_middleware),
filename:join([PrivDir, Path]).
source_path(Path) ->
<< (filename:rootname(Path))/binary, ".md" >>.