Browse Source

Add an index.html that is also served statically as the default for /

David N. Welton 10 years ago
parent
commit
f5c37a789c

+ 1 - 0
examples/static_world/priv/index.html

@@ -0,0 +1 @@
+<h1>Howdy, Pardner</h1>

+ 1 - 0
examples/static_world/src/static_world_app.erl

@@ -13,6 +13,7 @@
 start(_Type, _Args) ->
 	Dispatch = cowboy_router:compile([
 		{'_', [
+			{"/", cowboy_static, {priv_file, static_world, "index.html"}},
 			{"/[...]", cowboy_static, {priv_dir, static_world, "",
 				[{mimetypes, cow_mimetypes, all}]}}
 		]}