# FastCGI support

LL::NG CGIs (Portal, Manager,…) can be used under a FastCGI system very easily. You just have to load LL::NG FastCGI support and write a loop in the CGI. Example with the portal:

    #!/usr/bin/perl
    use Lemonldap::NG::Common::CGI qw(fastcgi);
    use Lemonldap::NG::Portal::SharedConf;
    # ...

    LMAUTH: while ( my $portal = Lemonldap::NG::Portal::SharedConf->new({}) ) {
        # ...
    }

Key steps :

- Load “Lemonldap::NG::Common::CGI qw(fastcgi)“ before any other LL::NG library
- insert a loop around the HTML printing, starting with the object creation (→new)
- insert a label “LMAUTH” ahead of the loop

An example is given under the source tree : lemonldap-ng-portal/example/index.fcgi