Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 7b3d9943a9
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (23 sloc) 0.503 kB
%% Feel free to use, reuse and abuse the code in this file.
%% @private
-module(static_app).
-behaviour(application).
%% API.
-export([start/2]).
-export([stop/1]).
%% API.
start(_Type, _Args) ->
Dispatch = [
{'_', [
{['...'], cowboy_static, [
{directory, {priv_dir, static, []}},
{mimetypes, {fun mimetypes:path_to_mimes/2, default}}
]}
]}
],
{ok, _} = cowboy:start_http(http, 100, [{port, 8080}], [
{dispatch, Dispatch}
]),
static_sup:start_link().
stop(_State) ->
ok.
Jump to Line
Something went wrong with that request. Please try again.