Commit 4e6ba2e3 authored by Pranay Sashank's avatar Pranay Sashank

Ask whether to publish from commandline.

parent 9b2e26e6
Pipeline #30811860 failed with stage
in 0 seconds
......@@ -86,19 +86,23 @@ defaultConfig path = do
runNode :: String -> IO ()
runNode configPath = do
config <- Config.readConfig configPath
let resourceHandlersNew = ResourceHandlers (HM.insert HelloWorld handlerNew HM.empty)
let topicHandlersNew = TopicHandlers (HM.insert HelloWorldHeader handlerTopic HM.empty)
let resourceHandlersNew =
ResourceHandlers (HM.insert HelloWorld handlerNew HM.empty)
let topicHandlersNew =
TopicHandlers (HM.insert HelloWorldHeader handlerTopic HM.empty)
env <- mkP2PEnv config resourceHandlersNew topicHandlersNew
runFileLoggingT (toS $ Config.logFile config) $
runAppM
env
(do
initP2P config
(do initP2P config
liftIO $ threadDelay 5000000
stuffPublisher
liftIO $ putStrLn "Publish (y/n)?"
answer <- liftIO getLine
if answer == "y"
then stuffPublisher
else return ()
-- getHelloWorld
liftIO $ threadDelay 500000000
)
liftIO $ threadDelay 500000000)
main :: IO ()
main = do
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment