http://kdr2.net/sb-fastcgi.html
It works well for me, and maybe useful for you.
Expect your advice and bug-reports
Thanks.
It works well for me, and maybe useful for you.
Expect your advice and bug-reports
Thanks.
Discuss and learn Lisp programming of all dialects
This is a read-only archive of lispforum.com. The forum was locked to new users and posts and is preserved here as static HTML from a database snapshot taken on 2019-09-07.
7 posts · 2077 views
# git clone git://github.com/KDr2/sb-fastcgi.gitTEST> (sb-fastcgi:load-libfcgi "/usr/lib/libfcgi.so.0")
T
TEST> (defun simple-app (req)
(let ((c (format nil "Content-Type: text/plain
Hello, I am a fcgi-program using Common-Lisp")))
(sb-fastcgi:fcgx-puts req c)))
; compiling (SB-FASTCGI:SIMPLE-SERVER (FUNCTION SIMPLE-APP))SIMPLE-APP
TEST> (defun run-app-0 ()
(sb-fastcgi:simple-server #'simple-app))
RUN-APP-0
TEST> (run-app-0)
"ACCEPT ERROR"Last edited by nuntius on , edited 1 time in total. Reason: add code tag
Warren Wilkinson wrote: I'm guessing more portable to other web serversYes, it's more portable to other web servers, it can run on apache/nginx/lighttpd and all other web-servers support fastcgi,
Warren Wilkinson wrote: would it be faster?You can refer to http://fastcgi.com, but I think, is it faster depends on you app-implementation, and to the same app runs
Warren Wilkinson wrote: mod-lisp has really easy communication -- is this harder or simpler?It's simpler, I provider WSGI-LIKE API in it, which is easy to use.
vanekl wrote:The simple-server use the file-descriptor *stdin* as a server-socket(a listening socket),TEST> (defun run-app-0 () (sb-fastcgi:simple-server #'simple-app)) RUN-APP-0 TEST> (run-app-0) "ACCEPT ERROR"
(sb-fastcgi:socket-server #'simple-app
:inet-addr "0.0.0.0"
:port 9000)
will listens on 0.0.0.0:9000location / {
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
}
More info about how to run a fastcgi-app on the webservers you can see :