From 11fcf6229751eb266485cbba78d30aced1787d14 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 20 Aug 2019 00:17:23 +0100 Subject: chore(tazblog): Replace BlogDB with stubs for DNS-based storage Removes acid-state specific code and the former BlogDB module, in its stead the new BlogStorage module contains stubs for the functions that will be filled in with DNS-based storage. This code is unformatted and will not currently serve a working blog. --- services/tazblog/db/Main.hs | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 services/tazblog/db/Main.hs (limited to 'services/tazblog/db') diff --git a/services/tazblog/db/Main.hs b/services/tazblog/db/Main.hs deleted file mode 100644 index 9523041f109a..000000000000 --- a/services/tazblog/db/Main.hs +++ /dev/null @@ -1,34 +0,0 @@ --- | Main module for the database server -module Main where - -import BlogDB (initialBlogState) -import Control.Applicative (pure, (<$>), (<*>)) -import Control.Exception (bracket) -import Data.Acid -import Data.Acid.Local (createCheckpointAndClose) -import Data.Acid.Remote -import Data.Word -import Network (PortID (..)) -import Options - -data DBOptions = DBOptions { - dbPort :: Word16, - stateDirectory :: String -} - -instance Options DBOptions where - defineOptions = pure DBOptions - <*> simpleOption "dbport" 8070 - "Port to serve acid-state on remotely." - <*> simpleOption "state" "/var/tazblog/state" - "Directory in which the acid-state is located." - -main :: IO () -main = do - putStrLn ("Launching TazBlog database server ...") - runCommand $ \opts args -> - bracket (openState opts) createCheckpointAndClose - (acidServer skipAuthenticationCheck $ getPort opts) - where - openState o = openLocalStateFrom (stateDirectory o) initialBlogState - getPort = PortNumber . fromIntegral . dbPort -- cgit 1.4.1