forked from filipg/gonito
use FastCGI instead of Warp for the final binary
This commit is contained in:
parent
0230b29db1
commit
51e1d584cd
@ -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)
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user