-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.config
94 lines (72 loc) · 3.49 KB
/
app.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%% -*- mode: erlang -*-
%% vim: sw=4 ts=4 et ft=erlang
[
{nitrogen, [
% If a signkey is not specified, then Nitrogen uses the Erlang cookie.
% {signkey, "SECRET"},
% Default session timeout is 20 minutes.
% {session_timeout, 20},
% Specify a session cookie name. Uses "wf" by default.
% {cookie_name, "wf"},
% Setting the module_prefix to anything other than "" will change the
% behaviour of the dynamic route handler (the default route handler) to
% prefix page modules with it's value followed by an underscore. For
% example, setting module_prefix to "web" will make your page module
% for "/mypage" be called "web_mypage".
% {module_prefix, ""}
]},
%% SASL config
{sasl, [
{sasl_error_logger, {file, "log/sasl-error.log"}},
{errlog_type, error},
{error_logger_mf_dir, "log/sasl"}, % Log directory
{error_logger_mf_maxbytes, 10485760}, % 10 MB max file size
{error_logger_mf_maxfiles, 5} % 5 files max
]},
{simple_bridge, [
{handler, nitrogen},
%% the name of the simple_bridge handler module, which should not
%% change unless you're doing something custom to set up the context
%% and simple_bridge, and also to interact with the request in a
%% non-standard way. Generally speaking, it's not recommended to change
%% this unless you really know what you are doing.
{backend, cowboy},
%% cowboy | inets | mochiweb | webmachine | yaws
{address, "0.0.0.0"},
%% IP address to bind, either in tuple format or string
%% Port to bind
{document_root, "./static"},
%% The path on the local machine to handle static files
{static_paths, ["js/", "css/", "images/", "nitrogen/", "favicon.ico"]},
%% The list of paths to be automatically translated to static paths by simple_bridge
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% FILE UPLOAD SETTINGS
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
{max_post_size, 10},
%% No multipart request greater than above will be accepted. Units are
%% MB
{max_file_size, 10},
%% No single uploaded file will be accepted greater than the above.
%% Units are MB.
{max_file_in_memory_size, 0},
%% If a file is less than the above, then instead of writing the file
%% to disk, it'll be retained in memory and can be retrieved by
%% sb_uploaded_file:data/1. See the README for more info.
{scratch_dir, "./scratch"}
%% This is the location of the temp directory where uploaded files will
%% be placed.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% cowboy-SPECIFIC DISPATCH TABLES:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% {webmachine_dispatch, DispatchTable},
%% Webmachine dispatch table override (ignores static_paths above)
%% {webmachine_dispatch_function, {Module, Function}}
%% A Module:Function() that when evaluated will return a dispatch table
%% for Webmachine, again ignores the static_paths above
%% {cowboy_dispatch, DispatchTable}
%% Cowboy dispatch table override (ignores static_paths)
%% {cowboy_dispatch_function, {Module, Function}}
%% A Module:Function() that when evaluated will return a dispatch tavle
%% for Cowboy, again ignoring the static_paths above
]}
].