added CGI backend (hopefully)
This commit is contained in:
parent
7662744153
commit
2611bdd254
2 changed files with 15 additions and 1 deletions
|
@ -12,6 +12,9 @@ import qualified Backend.Https as HTTPS
|
||||||
#ifdef FASTCGI_SUPPORT
|
#ifdef FASTCGI_SUPPORT
|
||||||
import qualified Backend.FastCGI as FASTCGI
|
import qualified Backend.FastCGI as FASTCGI
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CGI_SUPPORT
|
||||||
|
import qualified Backend.CGI as CGI
|
||||||
|
#endif
|
||||||
-- maybe we want a String instead of T.Text depends on
|
-- maybe we want a String instead of T.Text depends on
|
||||||
-- the argument parser
|
-- the argument parser
|
||||||
|
|
||||||
|
@ -40,5 +43,8 @@ backends =
|
||||||
#endif
|
#endif
|
||||||
#ifdef FASTCGI_SUPPORT
|
#ifdef FASTCGI_SUPPORT
|
||||||
BackendWithoutConfig FASTCGI.forkFastCGIBackend "fastcgi" "Deploy with fastcgi" :
|
BackendWithoutConfig FASTCGI.forkFastCGIBackend "fastcgi" "Deploy with fastcgi" :
|
||||||
|
#endif
|
||||||
|
#ifdef CGI_SUPPORT
|
||||||
|
BackendWithoutConfig CGI.forkCGIBackend "cgi" "Deploy with cgi" :
|
||||||
#endif
|
#endif
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -1,4 +1,12 @@
|
||||||
module Backend.CGI where
|
module Backend.CGI(forkCGIBackend) where
|
||||||
|
|
||||||
|
import Config
|
||||||
|
import qualified Network.Wai as Wai
|
||||||
|
import qualified Network.Wai.Handler.CGI as CGI
|
||||||
|
import Control.Concurrent.MVar
|
||||||
|
|
||||||
|
forkCGIBackend :: Wai.Application -> IO [MVar ()]
|
||||||
|
forkCGIBackend = fmap (: []) . forkBackend . CGI.run
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue