Use saltine package
This commit is contained in:
parent
b03c7fd087
commit
13cd466e87
2 changed files with 3 additions and 0 deletions
|
@ -39,6 +39,7 @@ executable hanafudapi
|
|||
, http-types
|
||||
, aeson
|
||||
, mtl
|
||||
, saltine
|
||||
, text
|
||||
, vector
|
||||
, wai
|
||||
|
|
|
@ -8,6 +8,7 @@ import qualified Config (listenPort)
|
|||
import Control.Concurrent (newMVar, modifyMVar)
|
||||
import Control.Exception (finally)
|
||||
import Control.Monad.Reader (ReaderT(..), asks)
|
||||
import Crypto.Saltine (sodiumInit)
|
||||
import qualified Hanafuda.Message as Message (FromClient(..))
|
||||
import Messaging (broadcast, relay)
|
||||
import Network.HTTP.Types.Status (badRequest400)
|
||||
|
@ -36,6 +37,7 @@ serverApp onEnter onExit = do
|
|||
|
||||
main :: IO ()
|
||||
main = do
|
||||
sodiumInit
|
||||
app <- serverApp Automaton.start exit
|
||||
run Config.listenPort $ websocketsOr defaultConnectionOptions app blockNonWS
|
||||
where
|
||||
|
|
Loading…
Reference in a new issue