Clack.Handler.Fcgi - Clack handler for FastCGI.

SYNOPSIS

;; Start server  
(run (lambda (env)  
       '(200 nil ("ok")))  
     :port 9000)  
 
;; Using clackup  
(clackup (lambda (env)  
           '(200 nil ("ok")))  
         :server :fcgi  
         :port 9000) 

DESCRIPTION

Clack.Handler.Fcgi is a Clack handler to run any Clack application as a FastCGI application. This handler depends on the library "cl-fastcgi", so it only works on SBCL, CMUCL, GNU CLISP, Clozure CL, LispWorks and ECL.

Here's an example using Nginx.

# nginx.conf  
worker_processes  1;  
 
events {  
    worker_connections  1024;  
}  
 
http {  
    server {  
        listen       8080;  
        server_name  localhost;  
        location / {  
               include_fastcgi_params;  
               fastcgi_pass   127.0.0.1:9000;  
        }  
    }  
} 

This configuration to opens port 8080 to web browsers, and listens for the Lisp process on port 9000.

Run Clack application by clackup.

(clack:clackup (lambda (env) '(200 nil ("Hello, FastCGI!")))  
  :server :fcgi  
  :port 9000) 

Now, you can access http://localhost:8080/ and Clack should show you "Hello, FastCGI!".

AUTHOR

Eitarow Fukamachi (e.arrows@gmail.com)

EXTERNAL SYMBOLS