Просмотр исходного кода

Fix static handler snippet in the guide

Thanks to Martin Törnwall for pointing this out.
Loïc Hoguin 12 лет назад
Родитель
Сommit
5b9404fd07
1 измененных файлов с 3 добавлено и 3 удалено
  1. 3 3
      guide/static_handlers.md

+ 3 - 3
guide/static_handlers.md

@@ -19,14 +19,14 @@ Static handlers are pre-written REST handlers. They only need
 to be specified in the routing information with the proper options.
 
 The following example routing serves all files found in the
-`priv_dir/static/` directory of the application. It uses a
-mimetypes library to figure out the files' content types.
+`priv_dir/static/` directory of the application `my_app`. It uses
+a mimetypes library to figure out the files' content types.
 
 ``` erlang
 Dispatch = [
 	{'_', [
 		{"/[...]", cowboy_static, [
-			{directory, {priv_dir, static, []}},
+			{directory, {priv_dir, my_app, [<<"static">>]}},
 			{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
 		]}
 	]}