FCGI::...::PSGI(3pm)

πŸ“¦
version 0.22 Β· 2 versions
  • 0.22 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 0.22 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

✨ NAME ✨

okay so bestie, welcome to FCGI::...::PSGI β€” the manual page from User Contributed Perl Documentation, aka the girlies who ship docs alongside the code. This one is FCGI::Engine::PSGI and it's literally here to run PSGI applications with FCGI::Engine πŸ’–


🌸 SYNOPSIS 🌸

bestie, here's the whole vibe, copy-paste ready, no cap:

# in scripts/my_psgi_app_fcgi.pl
use strict;
use warnings;

use FCGI::Engine::PSGI;

FCGI::Engine::PSGI->new_with_options(
    app => sub {
        my $env = shift;
        [
            200,
            [ 'Content-type' => 'text/html' ],
            [ "Hello World" ]
        ]
    }
)->run;

# run as normal FCGI script
perl scripts/my_psgi_app_fcgi.pl

# run as standalone FCGI server
perl scripts/my_psgi_app_fcgi.pl --nproc 10 --pidfile /tmp/my_app.pid \
                                 --listen /tmp/my_app.socket --daemon

# see also FCGI::Engine::Manager for managing
# multiple FastCGI backends under one script

like, that's it. that's the whole ritual. run it as a plain FCGI script, or go full standalone server mode with --nproc 10, --pidfile /tmp/my_app.pid, --listen /tmp/my_app.socket, --daemon β€” main character energy fr fr πŸ‘‘

and see also FCGI::Engine::Manager for managing multiple FastCGI backends under one script. iykyk πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

so this module is an extension of FCGI::Engine::Core, and what it adds is support for PSGI applications. slay.

you can refer to the FCGI::Engine docs for most of what you need to know β€” they've got you, babe. the only difference is this: instead of a handler_class, a handler_method and handler_args, you simply have the app attribute πŸŽ€

and that app attribute is expected to be a PSGI compliant application. that's the whole deal. iconic, honestly. ✨


😭 BUGS 😭

not me having to tell you this, but: all complex software has bugs lurking in it, and this module is no exception πŸ’€

if you find a bug, please either email me, or add the bug to cpan-RT. do it for the girlies 🫢


πŸ‘‘ AUTHOR πŸ‘‘

Stevan Little <stevan.little@iinteractive.com>


Copyright 2009-2010 Infinity Interactive, Inc.

<http://www.iinteractive.com>

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


okay and that's a wrap bestie πŸŽ€ this whole page came to you courtesy of the perl v5.36.0 toolchain, dated 2022-12-10, from the FCGI::...::PSGI(3pm) page in User Contributed Perl Documentation. go forth and run your PSGI app, periodt πŸ’–πŸ¦‹βœ¨

πŸ“¦ where this page comes from