This actually turned out to be rather easy. Say that the application has a router
function which has the type of router :: ScottyM ()
.
The way you'd run the app normally is
main :: IO ()
main = scotty 3000 router
the only thing needed to make this work with wai-handler-devel
is to define another function, say dev
, that looks like this
dev :: (Application -> IO ()) -> IO ()
dev h = scottyApp router >>= h
After that you just need to run wai-handler-devel 3000 MyModule dev
and it all works perfectly :)