The inets httpd server docs say,
The following is to be put in the Erlang node application configuration file to start an HTTP server at application startup:
[{inets, [{services, [{httpd, [{proplist_file,
"/var/tmp/server_root/conf/8888_props.conf"}]},
{httpd, [{proplist_file,
"/var/tmp/server_root/conf/8080_props.conf"}]}]}]}].
Where does that go in an app created by rebar3?
The OTP Application docs say,
7.8 Configuring an Application
An application can be configured using configuration parameters. These are a list of {Par,Val} tuples specified by a key env in the .app file:
{application, ch_app,
[{description, "Channel allocator"},
{vsn, "1"},
{modules, [ch_app, ch_sup, ch3]},
{registered, [ch3]},
{applications, [kernel, stdlib, sasl]},
{mod, {ch_app,[]}},
{env, [{file, "/usr/local/log"}]}
]}.
Par is to be an atom. Val is any term.
That seems to suggest that you create environment variables with {Name, Value}
tuples. However, the required code specified in the httpd server docs does not seem to be in that format.
1条答案
按热度按时间v1uwarro1#
只需将其放入sys.config文件中,该文件位于您的发布版本的config文件夹中。如果您已经有了任何内容,则其格式为: