Skip to content

Commit

Permalink
Rename example 'static' to 'static_world' to avoid confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
essen committed Jan 30, 2013
1 parent eaaa81c commit f96e20a
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ Cowboy Examples
* [rest_hello_world](./examples/rest_hello_world):
return the data type that matches the request type (ex: html, text, json)

* [static](./examples/static):
an example file server
* [static_world](./examples/static_world):
static file handler

* [websocket](./examples/websocket):
websocket example
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Cowboy Static Files Server
Cowboy Static File Handler
==========================

To compile this example you need rebar in your PATH.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.

{application, static, [
{description, "Cowboy static file server example."},
{application, static_world, [
{description, "Cowboy static file handler example."},
{vsn, "1"},
{modules, []},
{registered, []},
Expand All @@ -10,6 +10,6 @@
stdlib,
cowboy
]},
{mod, {static_app, []}},
{mod, {static_world_app, []}},
{env, []}
]}.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% Feel free to use, reuse and abuse the code in this file.

-module(static).
-module(static_world).

%% API.
-export([start/0]).
Expand All @@ -11,4 +11,4 @@ start() ->
ok = application:start(crypto),
ok = application:start(ranch),
ok = application:start(cowboy),
ok = application:start(static).
ok = application:start(static_world).
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.

%% @private
-module(static_app).
-module(static_world_app).
-behaviour(application).

%% API.
Expand All @@ -14,15 +14,15 @@ start(_Type, _Args) ->
Dispatch = cowboy_router:compile([
{'_', [
{"/[...]", cowboy_static, [
{directory, {priv_dir, static, []}},
{directory, {priv_dir, static_world, []}},
{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
]}
]}
]),
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
static_sup:start_link().
static_world_sup:start_link().

stop(_State) ->
ok.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%% Feel free to use, reuse and abuse the code in this file.

%% @private
-module(static_sup).
-module(static_world_sup).
-behaviour(supervisor).

%% API.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
erl -pa ebin deps/*/ebin -s static \
erl -pa ebin deps/*/ebin -s static_world \
-eval "io:format(\"Point your browser at http://localhost:8080/test.txt~n\")." \
-eval "io:format(\"Point your browser at http://localhost:8080/video.html~n\")."

0 comments on commit f96e20a

Please sign in to comment.