Gzip compression
This commit is contained in:
+2
-1
@@ -10,6 +10,7 @@ import Database.HDBC.PostgreSQL (connectPostgreSQL')
|
|||||||
import Control.Applicative
|
import Control.Applicative
|
||||||
import Options.Applicative hiding (columns)
|
import Options.Applicative hiding (columns)
|
||||||
import Network.Wai.Handler.WarpTLS (tlsSettings, runTLS)
|
import Network.Wai.Handler.WarpTLS (tlsSettings, runTLS)
|
||||||
|
import Network.Wai.Middleware.Gzip (gzip, def)
|
||||||
|
|
||||||
-- }}}
|
-- }}}
|
||||||
|
|
||||||
@@ -35,7 +36,7 @@ main = do
|
|||||||
|
|
||||||
Prelude.putStrLn $ "Listening on port " ++ (show $ configPort conf :: String)
|
Prelude.putStrLn $ "Listening on port " ++ (show $ configPort conf :: String)
|
||||||
conn <- connectPostgreSQL' dburi
|
conn <- connectPostgreSQL' dburi
|
||||||
runTLS tls settings $ app conn
|
runTLS tls settings $ gzip def $ app conn
|
||||||
|
|
||||||
where
|
where
|
||||||
describe = progDesc "create a REST API to an existing Postgres database"
|
describe = progDesc "create a REST API to an existing Postgres database"
|
||||||
|
|||||||
Reference in New Issue
Block a user