From b4b2b053b9313b708e579310a87009ec4ff6eb43 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 11 Mar 2014 18:12:51 +0100 Subject: Updated for new options package --- src/Main.hs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'src/Main.hs') diff --git a/src/Main.hs b/src/Main.hs index 88bf59121eac..a684db4e052a 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -42,12 +42,17 @@ import RSS {- Server -} -defineOptions "MainOptions" $ do - stringOption "optState" "statedir" "../" - "Directory in which the /BlogState dir is located.\ - \ The default is ../ (if run from src/)" - intOption "optPort" "port" 8000 - "The port to run the web server on. Default is 8000" +data MainOptions = MainOptions { + optState :: String, + optPort :: Int +} + +instance Options MainOptions where + defineOptions = pure MainOptions + <*> simpleOption "statedir" "/var/tazblog/" + "Directory in which the BlogState is located." + <*> simpleOption "port" 8000 + "Port to run on. Default is 8000." tmpPolicy :: BodyPolicy tmpPolicy = defaultBodyPolicy "./tmp/" 0 200000 1000 -- cgit 1.4.1