Wynn Netherland changelog.com/posts

Spooky: Sinatra-inspired web framework for Erlang

Spooky is the latest framework inspired by The Chairman, this time in Erlang:

-module(spooky_get_hello_world).
-behaviour(spooky).

-export([init/1, get/3]).

init([])->
    [{port, 8000}, {handlers, [?MODULE]}].

get(_Req, [], _State)->
    {200, "Hello world"};
get(_Req, [Name], _State)->
    {200, "Hello world, " ++ Name}.

/from Alen Mujezinovic


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00