tackling route params
This is really nice that it’s a lot like expressWe can add route parameters with :xxx in the url, just like Sinatra and express. To read it in our handler, we use the param function. Edit the /hello route to be thisget "/hello/:name" $ do
name <- param "name"
text ("hello " <> name <> "!")
Tried this, got some errors. realized that Haskell has a ton of ideas about strings. Like Text.‘Text’ is defined in ‘Data.Text.Internal’
‘Data.Text.Internal.Lazy.Text’
is defined in ‘Data.Text.Internal.Lazy’
Resources
GuideText TypesFollow
JavaScript to HaskellTwitter: @jstoHaskell()Site: JSToHaskellmicroblog: @jtomchakJesse TomchakTwitter: @jtomchak