roxen.lists.pike.general

Subject Author Date
Re: Less filling (Re: Startup times Pike vs. Perl) Martin Nilsson (Opera Mini - A <6341[at]lyskom[dot]lysator[dot]liu[dot]se> 20-08-2009
I use this for testing, and modify as needed.

Protocols.HTTP.Server.Port listen_port;

void handle_request( Protocols.HTTP.Server.Request request )
{
    request->response_and_finish( ([ "data" : "Hello",
                                     "type":"text/html" ]) );
}

int main()
{
    listen_port = Protocols.HTTP.Server.Port( handle_request, 8080 );
    return -1;
}