dashboard

This commit is contained in:
Feng Lee 2015-05-08 11:14:18 +08:00
parent 5fdec5b8c4
commit c6e9238879
4 changed files with 22 additions and 2 deletions

4
TODO
View File

@ -6,6 +6,10 @@ v0.9.0-alpha (2015-05-30)
v0.8.0-alpha (2015-05-10) v0.8.0-alpha (2015-05-10)
------------------------- -------------------------
Presence Management....
Force Subscriptions...
Documents... Documents...
MySQL Auth MySQL Auth

View File

@ -28,6 +28,11 @@
-author("Feng Lee <feng@emqtt.io>"). -author("Feng Lee <feng@emqtt.io>").
-export([handle_request/1]).
%%TODO... %%TODO...
handle_request(Req) ->
Req:ok("hello!").

View File

@ -10,7 +10,18 @@
%% =================================================================== %% ===================================================================
start(_StartType, _StartArgs) -> start(_StartType, _StartArgs) ->
emqttd_dashboard_sup:start_link(). {ok, Sup} = emqttd_dashboard_sup:start_link(),
open_listener(application:get_env(listener)),
{ok, Sup}.
stop(_State) -> stop(_State) ->
ok. ok.
%% open http port
open_listener({_Http, Port, Options}) ->
MFArgs = {emqttd_dashboard, handle_request, []},
mochiweb:start_http(Port, Options, MFArgs).
close_listener(Port) ->
mochiweb:stop_http(Port).

View File

@ -14,7 +14,7 @@
% %
% {emqttd_dashboard, [ % {emqttd_dashboard, [
% {listener, % {listener,
% {http, 8080, [ % {http, 18083, [
% {acceptors, 4}, % {acceptors, 4},
% {max_clients, 512}]}} % {max_clients, 512}]}}
% ]} % ]}