scotty-hastache - Integrating Hastache templates into Scotty

  •        0

module Main whereimport Text.Hastacheimport Web.Scotty.Trans as Simport Web.Scotty.Hastachemain :: IO ()main = scottyH' 3000 $ do setTemplatesDir "templates" -- ^ Setting up the director with templates get "/:word" $ do beam <- param "word" setH "action" $ MuVariable (beam :: String) -- ^ "action" will be binded to the contents of 'beam' hastache "greet.html"```templates/greet.html:```html

Scotty, {{action}} me up!

```Installation=========1. Install GHC, Haskell platform, etc.2. Use cabal-install to automatically pull all the dependencies andinstall the library:```cabal updatecabal install scotty-hastache```Examples========- `examples` folder-

https://github.com/scotty-web/scotty-hastache

Tags
Implementation
License
Platform

   




Related Projects