summaryrefslogtreecommitdiff
path: root/src/example-based/exb-fcgi.hs
diff options
context:
space:
mode:
authorJohn J. Camilleri <john@johnjcamilleri.com>2018-11-28 19:22:19 +0100
committerJohn J. Camilleri <john@johnjcamilleri.com>2018-11-28 19:22:19 +0100
commite2401f32ca20f8ec9bea23df909139878ad3f8bf (patch)
tree73db309f81eb40c69bd24fd9549df3a1655f8801 /src/example-based/exb-fcgi.hs
parent69cea20dac8ac73fa0a61ed4ff427d2524ee253b (diff)
Revert "remove the example-based folder. The code is still in the archive"
This reverts commit 05c2cfb628147f7d6fa0a6c2f38eb9d67b2eb007.
Diffstat (limited to 'src/example-based/exb-fcgi.hs')
-rw-r--r--src/example-based/exb-fcgi.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/example-based/exb-fcgi.hs b/src/example-based/exb-fcgi.hs
new file mode 100644
index 000000000..54f1872d0
--- /dev/null
+++ b/src/example-based/exb-fcgi.hs
@@ -0,0 +1,15 @@
+{-# LANGUAGE CPP #-}
+import Control.Concurrent(forkIO)
+import Network.FastCGI(runFastCGI,runFastCGIConcurrent')
+import ExampleService(cgiMain,newPGFCache)
+
+main = do --stderrToFile logFile
+ fcgiMain =<< newPGFCache
+
+
+fcgiMain cache =
+#ifndef mingw32_HOST_OS
+ runFastCGIConcurrent' forkIO 100 (cgiMain cache)
+#else
+ runFastCGI (cgiMain cache)
+#endif