Popularity
4.0
Declining
Activity
0.0
Stable
6
3
1
Monthly Downloads: 17
Programming language: Haskell
License: BSD 3-clause "New" or "Revised" License
scotty-cookie alternatives and similar packages
Based on the "scotty" category.
Alternatively, view scotty-cookie alternatives based on common mentions on social networks and blogs.
-
scotty
Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp (Official Repository) -
scotty-format
Response format helper for the Scotty web framework -
scotty-path-normalizer
Scotty action to redirect to a normalized path (remove trailing slash, "..", etc.) -
scotty-binding-play
The Play Framework style data binding in Scotty.
WorkOS - The modern identity platform for B2B SaaS
The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
Promo
workos.com
Do you think we are missing an alternative of scotty-cookie or a related project?
README
Usage example: simple hit counter
{-# LANGUAGE OverloadedStrings #-}
import Control.Monad
import Data.Monoid
import Data.Maybe
import Data.Text.Read
import qualified Data.Text.Lazy as TL
import Web.Scotty
import Web.Scotty.Cookie
main :: IO ()
main = scotty 3000 $
get "/" $ do
hits <- liftM (fromMaybe "0") $ getCookie "hits"
let hits' = case decimal hits of
Right n -> TL.pack . show . (+1) $ (fst n :: Integer)
Left _ -> "1"
setSimpleCookie "hits" $ TL.toStrict hits'
html $ mconcat [ "<html><body>"
, hits'
, "</body></html>"
]