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

Rename example 'static' to 'static_world' to avoid confusion

This commit is contained in:
Loïc Hoguin 2013-01-30 22:13:31 +01:00
parent eaaa81cce6
commit f96e20aef7
12 changed files with 13 additions and 13 deletions

View file

@ -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

View file

@ -1,4 +1,4 @@
Cowboy Static Files Server
Cowboy Static File Handler
==========================
To compile this example you need rebar in your PATH.

View file

@ -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, []},
@ -10,6 +10,6 @@
stdlib,
cowboy
]},
{mod, {static_app, []}},
{mod, {static_world_app, []}},
{env, []}
]}.

View file

@ -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]).
@ -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).

View file

@ -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.
@ -14,7 +14,7 @@ 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}}
]}
]}
@ -22,7 +22,7 @@ start(_Type, _Args) ->
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{env, [{dispatch, Dispatch}]}
]),
static_sup:start_link().
static_world_sup:start_link().
stop(_State) ->
ok.

View file

@ -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.

View file

@ -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\")."