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,
runSettings, setHost,
setOnException, setPort, getPort)
import Network.Wai.Handler.FastCGI (run)
import Network.Wai.Middleware.RequestLogger (Destination (Logger),
IPAddrSource (..),
OutputFormat (..), destination,
@ -156,8 +158,8 @@ appMain = do
app <- makeApplication foundation
-- 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)

View File

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

View File

@ -5,6 +5,6 @@ flags:
packages:
- '.'
- '../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
resolver: nightly-2015-12-19