diff options
Diffstat (limited to '')
| -rw-r--r-- | src/xml_server_app.erl | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/xml_server_app.erl b/src/xml_server_app.erl new file mode 100644 index 0000000..d2e1c18 --- /dev/null +++ b/src/xml_server_app.erl @@ -0,0 +1,28 @@ +%%% @doc XML Server Application Starter +%%% +%%% Convenient module for starting the XML server with all dependencies. + +-module(xml_server_app). +-export([start/0, start/1]). + +%% @doc Start XML server on default port 8080. +start() -> + start(8080). + +%% @doc Start XML server on specified port. +start(Port) -> + % Initialize Domino + operations:setup(), + io:format("~nDomino initialized~n"), + + % Create example database + DB = repl:example_db(), + + % Start XML server + xml_server:start(Port, DB), + + io:format("~nXML Server ready!~n"), + io:format("Connect with: nc localhost ~p~n", [Port]), + io:format("Or run Emacs client: M-x domino-run-examples~n~n"), + + ok. |
