Popularity
4.7
Growing
Activity
0.0
Stable
6
3
1
Monthly Downloads: 27
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-path-normalizer
Scotty action to redirect to a normalized path (remove trailing slash, "..", etc.) -
scotty-format
Response format helper for the Scotty web framework -
scotty-binding-play
The Play Framework style data binding in Scotty.
Less time debugging, more time building
Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.
Promo
scoutapm.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>"
]