Merge pull request #79 from begriffs/favicon
Added a favicon, so important!
This commit is contained in:
@@ -17,6 +17,7 @@ executable dbapi
|
|||||||
, HDBC, HDBC-postgresql
|
, HDBC, HDBC-postgresql
|
||||||
, warp, wai >= 3.0.1 && < 3.0.2
|
, warp, wai >= 3.0.1 && < 3.0.2
|
||||||
, wai-extra, wai-cors
|
, wai-extra, wai-cors
|
||||||
|
, wai-middleware-static >= 0.6.0
|
||||||
, HTTP, convertible
|
, HTTP, convertible
|
||||||
, case-insensitive
|
, case-insensitive
|
||||||
, http-types, scientific, time
|
, http-types, scientific, time
|
||||||
@@ -54,6 +55,7 @@ Test-Suite spec
|
|||||||
, HTTP, convertible
|
, HTTP, convertible
|
||||||
, case-insensitive
|
, case-insensitive
|
||||||
, wai-extra, wai-cors, containers
|
, wai-extra, wai-cors, containers
|
||||||
|
, wai-middleware-static >= 0.6.0
|
||||||
, http-types, scientific, time
|
, http-types, scientific, time
|
||||||
, bytestring, aeson, network >= 2.6
|
, bytestring, aeson, network >= 2.6
|
||||||
, text, optparse-applicative
|
, text, optparse-applicative
|
||||||
|
|||||||
+5
-1
@@ -13,6 +13,7 @@ import Control.Applicative
|
|||||||
import Options.Applicative hiding (columns)
|
import Options.Applicative hiding (columns)
|
||||||
import Network.Wai.Middleware.Gzip (gzip, def)
|
import Network.Wai.Middleware.Gzip (gzip, def)
|
||||||
import Network.Wai.Middleware.Cors (cors)
|
import Network.Wai.Middleware.Cors (cors)
|
||||||
|
import Network.Wai.Middleware.Static (staticPolicy, only)
|
||||||
|
|
||||||
argParser :: Parser AppConfig
|
argParser :: Parser AppConfig
|
||||||
argParser = AppConfig
|
argParser = AppConfig
|
||||||
@@ -37,7 +38,10 @@ 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
|
||||||
run port $ (if configSecure conf then redirectInsecure else id)
|
run port $ (if configSecure conf then redirectInsecure else id)
|
||||||
. gzip def . cors corsPolicy . clientErrors
|
. gzip def
|
||||||
|
. cors corsPolicy
|
||||||
|
. clientErrors
|
||||||
|
. staticPolicy (only [("favicon.ico", "static/favicon.ico")])
|
||||||
$ (inTransaction . authenticated (cs $ configAnonRole conf) . withSavepoint)
|
$ (inTransaction . authenticated (cs $ configAnonRole conf) . withSavepoint)
|
||||||
app conn
|
app conn
|
||||||
where
|
where
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Reference in New Issue
Block a user