web_server.erl

1
2
3
4
5
6
7
8
9
10
-module(web_server).

-compile([debug_info]).
-export([start/0,start/1]).

start() -> start(9999).

start(Port) ->
    mochiweb_http:start([{port, Port}, {loop, fun dispatch_requests/1}]).

Started with

1
erl -boot start_sasl -s web_server start