Skip to content

Instantly share code, notes, and snippets.

@siong1987
Created September 12, 2009 03:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save siong1987/185713 to your computer and use it in GitHub Desktop.
Save siong1987/185713 to your computer and use it in GitHub Desktop.
-module(helloweb).
-export([start/0, stop/0]).
start() ->
mochiweb_http:start([
{name, ?MODULE},
{ip, any},
{port, 6500},
{loop, fun(Req) ->
Req:ok({"text/plain", "Hello, world"})
end}
]).
stop() ->
mochiweb:stop(?MODULE).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment