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