more touching

This commit is contained in:
nek0 2024-09-06 02:18:35 +02:00
parent 028d8794b3
commit 4c2692fb31
2 changed files with 15 additions and 7 deletions

View file

@ -12,9 +12,16 @@ import Prelude as P
import Crypto.JWT hiding (Context, header)
import Control.Concurrent.STM.TVar
import Control.Concurrent.STM (newTQueueIO)
import Control.Concurrent (forkIO)
import Control.Lens hiding (Context)
import Control.Monad (void, unless)
import Control.Monad.Reader
import Servant
import Servant.Server.Experimental.Auth
import qualified Servant.OpenApi as OA
@ -22,13 +29,19 @@ import Servant.Swagger.UI
import Servant.RawM.Server
import Data.Set as S (empty)
import qualified Data.ByteString.Lazy as B
import Data.ByteString.Char8 as B8 hiding (putStrLn)
import qualified Data.Text as T
import qualified Data.Text.Encoding as TE
import Data.String
import Data.Yaml
import Data.Version (showVersion)
import qualified Data.OpenApi as OA hiding (Server)
import Database.PostgreSQL.Simple
@ -39,12 +52,6 @@ import Network.Wai
import Network.Wai.Logger
import Network.Wai.Handler.Warp
import Control.Monad.Reader
import Control.Concurrent.STM.TVar
import Control.Lens hiding (Context)
import Options.Applicative
import System.Clock (TimeSpec(..))
@ -146,7 +153,6 @@ main = do
, rsJWTSecret =
fromOctets . B.fromStrict $ TE.encodeUtf8 jwt_secret
}
expirationSpec = TimeSpec 5 0 -- five seconds
runSettings settings (app initState)
where
opts = info (options <**> helper)

View file

@ -1,6 +1,8 @@
{-# LANGUAGE OverloadedStrings #-}
module Control.Settings where
import Control.Monad (void, unless)
import Control.Monad.Reader
import Servant