NAME

Continuity::Adapt::PSGI - PSGI backend for Continuity

SYNOPSIS

# Run with "plackup -s <whichever Coro friendly server> demo.pl"

# Twiggy and Corona are two Coro friendly Plack servers:
#
#       "Twiggy is a lightweight and fast HTTP server"
#       "Corona is a Coro based Plack web server. It uses Net::Server::Coro under the hood"

use Continuity;

my $server = Continuity->new( 
    adapter => Continuity::Adapt::PSGI->new,
    staticp => sub { 0 },
);

sub main {
  my $request = shift;
  my $i = 0;
  while(++$i) {
    $request->print("Hello number $i!");
    $request->next;
  }
}

$server->loop;

$adapter->map_path($path)

Decodes URL-encoding in the path and attempts to guard against malice. Returns the processed filesystem path.