Hoogle Search

Within LTS Haskell 22.19 (ghc-9.6.4)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. package scotty

    Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp A Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp.

    {-# LANGUAGE OverloadedStrings #-}
    
    import Web.Scotty
    
    main = scotty 3000 $
    get "/:word" $ do
    beam <- captureParam "word"
    html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"]
    
    Scotty is the cheap and cheerful way to write RESTful, declarative web applications.
    • A page is as simple as defining the verb, url pattern, and Text content.
    • It is template-language agnostic. Anything that returns a Text value will do.
    • Conforms to WAI Application interface.
    • Uses very fast Warp webserver by default.
    As for the name: Sinatra + Warp = Scotty.

  2. scotty :: Port -> ScottyM () -> IO ()

    scotty Web.Scotty

    Run a scotty application using the warp server.

  3. module Web.Scotty

    It should be noted that most of the code snippets below depend on the OverloadedStrings language pragma. Scotty is set up by default for development mode. For production servers, you will likely want to modify settings and the defaultHandler. See the comments on each of these functions for more information.

  4. scottyApp :: ScottyM () -> IO Application

    scotty Web.Scotty

    Turn a scotty application into a WAI Application, which can be run with any WAI handler.

  5. scottyOpts :: Options -> ScottyM () -> IO ()

    scotty Web.Scotty

    Run a scotty application using the warp server, passing extra options.

  6. scottySocket :: Options -> Socket -> ScottyM () -> IO ()

    scotty Web.Scotty

    Run a scotty application using the warp server, passing extra options, and listening on the provided socket. This allows the user to provide, for example, a Unix named socket, which can be used when reverse HTTP proxying into your application.

  7. scottyAppT :: (Monad m, Monad n) => (m Response -> IO Response) -> ScottyT m () -> n Application

    scotty Web.Scotty.Trans

    Turn a scotty application into a WAI Application, which can be run with any WAI handler. NB: scottyApp === scottyAppT id

  8. scottyOptsT :: (Monad m, MonadIO n) => Options -> (m Response -> IO Response) -> ScottyT m () -> n ()

    scotty Web.Scotty.Trans

    Run a scotty application using the warp server, passing extra options. NB: scottyOpts opts === scottyOptsT opts id

  9. scottySocketT :: (Monad m, MonadIO n) => Options -> Socket -> (m Response -> IO Response) -> ScottyT m () -> n ()

    scotty Web.Scotty.Trans

    Run a scotty application using the warp server, passing extra options, and listening on the provided socket. NB: scottySocket opts sock === scottySocketT opts sock id

  10. scottyT :: (Monad m, MonadIO n) => Port -> (m Response -> IO Response) -> ScottyT m () -> n ()

    scotty Web.Scotty.Trans

    Run a scotty application using the warp server. NB: scotty p === scottyT p id

Page 1 of many | Next