Popularity
4.3
Declining
Activity
0.0
Stable
5
3
1
Monthly Downloads: 19
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.
Build time-series-based applications quickly and at scale.
InfluxDB is the Time Series Platform where developers build real-time applications for analytics, IoT and cloud-native services. Easy to start, it is available in the cloud or on-premises.
Promo
www.influxdata.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>"
]