aboutsummaryrefslogtreecommitdiffstats
path: root/examples/static_world
diff options
context:
space:
mode:
Diffstat (limited to 'examples/static_world')
-rw-r--r--examples/static_world/Makefile8
-rw-r--r--examples/static_world/README.asciidoc30
-rw-r--r--examples/static_world/priv/index.html1
-rw-r--r--examples/static_world/priv/small.mp4bin383631 -> 0 bytes
-rw-r--r--examples/static_world/priv/small.ogvbin872453 -> 0 bytes
-rw-r--r--examples/static_world/priv/test.txt1
-rw-r--r--examples/static_world/priv/video.html11
-rw-r--r--examples/static_world/relx.config2
-rw-r--r--examples/static_world/src/static_world_app.erl27
-rw-r--r--examples/static_world/src/static_world_sup.erl23
10 files changed, 0 insertions, 103 deletions
diff --git a/examples/static_world/Makefile b/examples/static_world/Makefile
deleted file mode 100644
index cbce76c..0000000
--- a/examples/static_world/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-PROJECT = static_world
-PROJECT_DESCRIPTION = Cowboy static file handler example
-PROJECT_VERSION = 1
-
-DEPS = cowboy
-dep_cowboy_commit = master
-
-include ../../erlang.mk
diff --git a/examples/static_world/README.asciidoc b/examples/static_world/README.asciidoc
deleted file mode 100644
index 3f09900..0000000
--- a/examples/static_world/README.asciidoc
+++ /dev/null
@@ -1,30 +0,0 @@
-= Static file handler example
-
-To try this example, you need GNU `make` and `git` in your PATH.
-
-To build and run the example, use the following command:
-
-[source,bash]
-$ make run
-
-The example will serve all the files found in the 'priv/'
-directory. For example:
-
-* http://localhost:8080/test.txt[Plain text file]
-* http://localhost:8080/video.html[HTML5 video demo]
-
-== Example output
-
-[source,bash]
-----
-$ curl -i http://localhost:8080/test.txt
-HTTP/1.1 200 OK
-connection: keep-alive
-server: Cowboy
-date: Mon, 09 Sep 2013 13:49:50 GMT
-content-length: 52
-content-type: text/plain
-last-modified: Fri, 18 Jan 2013 16:33:31 GMT
-
-If you read this then the static file server works!
-----
diff --git a/examples/static_world/priv/index.html b/examples/static_world/priv/index.html
deleted file mode 100644
index 2ebe508..0000000
--- a/examples/static_world/priv/index.html
+++ /dev/null
@@ -1 +0,0 @@
-<h1>Howdy, Pardner</h1>
diff --git a/examples/static_world/priv/small.mp4 b/examples/static_world/priv/small.mp4
deleted file mode 100644
index 1fc4788..0000000
--- a/examples/static_world/priv/small.mp4
+++ /dev/null
Binary files differ
diff --git a/examples/static_world/priv/small.ogv b/examples/static_world/priv/small.ogv
deleted file mode 100644
index 6409d6e..0000000
--- a/examples/static_world/priv/small.ogv
+++ /dev/null
Binary files differ
diff --git a/examples/static_world/priv/test.txt b/examples/static_world/priv/test.txt
deleted file mode 100644
index 760cddb..0000000
--- a/examples/static_world/priv/test.txt
+++ /dev/null
@@ -1 +0,0 @@
-If you read this then the static file server works!
diff --git a/examples/static_world/priv/video.html b/examples/static_world/priv/video.html
deleted file mode 100644
index eca63ee..0000000
--- a/examples/static_world/priv/video.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
- <h1>HTML5 Video Example</h1>
- <video controls>
- <source src="small.ogv" type="video/ogg"/>
- <source src="small.mp4" type="video/mp4"/>
- </video>
- <p>Videos taken from <a href="http://techslides.com/sample-webm-ogg-and-mp4-video-files-for-html5/">TechSlides</a></p>
-</body>
-</html>
diff --git a/examples/static_world/relx.config b/examples/static_world/relx.config
deleted file mode 100644
index a480902..0000000
--- a/examples/static_world/relx.config
+++ /dev/null
@@ -1,2 +0,0 @@
-{release, {static_world_example, "1"}, [static_world]}.
-{extended_start_script, true}.
diff --git a/examples/static_world/src/static_world_app.erl b/examples/static_world/src/static_world_app.erl
deleted file mode 100644
index 4d194c7..0000000
--- a/examples/static_world/src/static_world_app.erl
+++ /dev/null
@@ -1,27 +0,0 @@
-%% Feel free to use, reuse and abuse the code in this file.
-
-%% @private
--module(static_world_app).
--behaviour(application).
-
-%% API.
--export([start/2]).
--export([stop/1]).
-
-%% API.
-
-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}]}}
- ]}
- ]),
- {ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
- {env, [{dispatch, Dispatch}]}
- ]),
- static_world_sup:start_link().
-
-stop(_State) ->
- ok.
diff --git a/examples/static_world/src/static_world_sup.erl b/examples/static_world/src/static_world_sup.erl
deleted file mode 100644
index a57d07a..0000000
--- a/examples/static_world/src/static_world_sup.erl
+++ /dev/null
@@ -1,23 +0,0 @@
-%% Feel free to use, reuse and abuse the code in this file.
-
-%% @private
--module(static_world_sup).
--behaviour(supervisor).
-
-%% API.
--export([start_link/0]).
-
-%% supervisor.
--export([init/1]).
-
-%% API.
-
--spec start_link() -> {ok, pid()}.
-start_link() ->
- supervisor:start_link({local, ?MODULE}, ?MODULE, []).
-
-%% supervisor.
-
-init([]) ->
- Procs = [],
- {ok, {{one_for_one, 10, 10}, Procs}}.