diff options
author | defanor <defanor@uberspace.net> | 2019-02-05 05:14:26 +0300 |
---|---|---|
committer | defanor <defanor@uberspace.net> | 2019-02-05 05:14:26 +0300 |
commit | a5ffe01c8806b720a99569dd407a4b14a67693e3 (patch) | |
tree | 540006cd70fb07dc7af03b42b9673d83627a68f5 /example/README.md | |
parent | e180c98004e213ff99d963f391b5f973ce952f7a (diff) |
Use plain CGI
This eliminates the last of large Haskell dependencies.
The multipart enctype is not supported now.
Diffstat (limited to 'example/README.md')
-rw-r--r-- | example/README.md | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/example/README.md b/example/README.md index d70b595..3aa50bf 100644 --- a/example/README.md +++ b/example/README.md @@ -14,10 +14,17 @@ them. `list.xsl` includes report and search forms, and lists the bugs. -To quickly try it, run `spawn-fcgi -p 5152 /bin/env pgxhtml` in this -directory, with database connection environment variables set if -needed, an `127.0.0.1 pgxhtml-test` entry in `/etc/hosts`, and a nginx -config akin to the following: +To quickly try the example after preparing a database, it can be +invoked directly in the `example` directory, e.g.: + +```sh +echo | QUERY_STRING="t=list&q=select+bug_search('','',10,0)" pgxhtml +``` + +To try it with a web server, ensure that `fcgiwrap` is running (e.g., +`fcgiwrap -s 'tcp:127.0.0.1:5152'`), database connection environment +variables are set if needed, an `127.0.0.1 pgxhtml-test` entry is in +`/etc/hosts`, and a nginx config akin to the following is set: ``` server { @@ -26,8 +33,13 @@ server { location / { include fastcgi_params; - fastcgi_param PATH_INFO $fastcgi_script_name; + fastcgi_param SCRIPT_FILENAME /home/defanor/.cabal/bin/pgxhtml; + fastcgi_param FCGI_CHDIR /home/defanor/proj/haskell/pgxhtml/example/; fastcgi_pass 127.0.0.1:5152; } } ``` + +Then +[http://pgxhtml-test/?t=list&q=select+bug_search('','',10,0)](http://pgxhtml-test/?t=list&q=select%20bug_search(%27%27,%27%27,10,0)) +should be available. |