1
1
mirror of https://github.com/aelve/guide.git synced 2024-11-27 10:10:50 +03:00

Close acid-state db upon exit or Ctrl-C

This commit is contained in:
Artyom 2016-03-04 18:22:29 +03:00
parent 597bbe1779
commit 5e1f5bf5e7

View File

@ -767,7 +767,7 @@ otherMethods = do
main :: IO ()
main = do
db <- openLocalStateFrom "state/" sampleState
bracket (openLocalStateFrom "state/" sampleState) closeAcidState $ \db -> do
createCheckpoint db
let config = defaultSpockCfg () PCNoDatabase db
runSpock 8080 $ spock config $ do