Libs to have a minimal api rest server running with routing features fully integrated with conduit

55 Views Asked by At

I'd like to stream all the way in an API rest with the conduit lib using routing features etc... So far I have used scotty but I'm obliged to terminate the stream inside my api rest call instead to fully integrate conduit with it... Maybe scotty is doing it but I didn't find a way :

post "/requestCommand/" $ do
                   command <- jsonData
                   (liftIO $ runConduit
                           $ yield (eventStoreConnection,command)
                             .| CommandStream.persist
                             .| sinkList) >>= json

I have the intuition that Yesod could do it btw, I'm investigating on that :-), conduit-extra can run a TCP server but I didn't find routing features attached with it...

Do you know some libs to have a minimal api rest server running with routing features (parsing/extracting url parameters, dispatching by post/get/put etc...) which is fully integrated with conduit ?

0

There are 0 best solutions below