PageRenderTime 30ms CodeModel.GetById 25ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/modules/mod_development/services/service_development_recompile.erl

https://code.google.com/p/zotonic/
Erlang | 38 lines | 14 code | 7 blank | 17 comment | 0 complexity | 65e4ec813f0e754c4b03ce690b4bc80e MD5 | raw file
 1%% @author Arjan Scherpenisse <arjan@scherpenisse.net>
 2%% @copyright 2009 Arjan Scherpenisse
 3%% Date: 2009-10-06
 4%% @doc Remotely recompile and flush.
 5
 6%% Copyright 2009 Arjan Scherpenisse
 7%%
 8%% Licensed under the Apache License, Version 2.0 (the "License");
 9%% you may not use this file except in compliance with the License.
10%% You may obtain a copy of the License at
11%% 
12%%     http://www.apache.org/licenses/LICENSE-2.0
13%% 
14%% Unless required by applicable law or agreed to in writing, software
15%% distributed under the License is distributed on an "AS IS" BASIS,
16%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17%% See the License for the specific language governing permissions and
18%% limitations under the License.
19
20-module(service_development_recompile).
21-author("Arjan Scherpenisse <arjan@scherpenisse.net>").
22
23-svc_title("Remotely code reload / recompile and flush.").
24-svc_needauth(false).
25
26-export([process_get/2]).
27
28-include_lib("zotonic.hrl").
29
30
31process_get(_ReqData, _Context) ->
32    try
33        z:m()
34    catch
35        _:_ ->
36            undefined
37    end,
38    "OK".