use FastCGI instead of Warp for the final binary

This commit is contained in:
Filip Gralinski 2016-01-09 10:09:02 +01:00
parent 0230b29db1
commit 51e1d584cd
3 changed files with 7 additions and 3 deletions

View File

@ -21,6 +21,8 @@ import Network.Wai.Handler.Warp (Settings, defaultSettings,
defaultShouldDisplayException, defaultShouldDisplayException,
runSettings, setHost, runSettings, setHost,
setOnException, setPort, getPort) setOnException, setPort, getPort)
import Network.Wai.Handler.FastCGI (run)
import Network.Wai.Middleware.RequestLogger (Destination (Logger), import Network.Wai.Middleware.RequestLogger (Destination (Logger),
IPAddrSource (..), IPAddrSource (..),
OutputFormat (..), destination, OutputFormat (..), destination,
@ -156,8 +158,8 @@ appMain = do
app <- makeApplication foundation app <- makeApplication foundation
-- Run the application with Warp -- Run the application with Warp
runSettings (warpSettings foundation) app -- runSettings (warpSettings foundation) app
run app
-------------------------------------------------------------- --------------------------------------------------------------
-- Functions for DevelMain.hs (a way to run the app from GHCi) -- Functions for DevelMain.hs (a way to run the app from GHCi)

View File

@ -116,6 +116,7 @@ library
, yesod-table , yesod-table
, regex-tdfa , regex-tdfa
, optparse-applicative , optparse-applicative
, wai-handler-fastcgi
executable gonito executable gonito
if flag(library-only) if flag(library-only)
@ -164,3 +165,4 @@ test-suite test
, hspec >= 2.0.0 , hspec >= 2.0.0
, classy-prelude , classy-prelude
, classy-prelude-yesod , classy-prelude-yesod
, wai-handler-fastcgi

View File

@ -5,6 +5,6 @@ flags:
packages: packages:
- '.' - '.'
- '../geval' - '../geval'
extra-deps: [markdown-0.1.13.2,geval-0.2.3.0,cond-0.4.1.1] extra-deps: [markdown-0.1.13.2,geval-0.2.3.0,cond-0.4.1.1,wai-handler-fastcgi-3.0.0.1]
compiler-check: newer-minor compiler-check: newer-minor
resolver: nightly-2015-12-19 resolver: nightly-2015-12-19