scottyweb 框架(Haskell)
scotty 是使用 Haskell 编写的 web 框架,灵感来自 Ruby 的Sinatra,使用 WAI 和 Warp (官方库)。
{-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Data.Monoid (mconcat)
main = scotty 3000 $ do
    get "/:word" $ do
        beam <- param "word"
        html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"] 
Scotty 以一种轻松且愉快的方式来编写 RESTful 、声明 Web 应用程序。
-  
一个页面很简单,只要限定动词,URL模式和文本内容。
 -  
无关模板语言,任何东西只要返回文本值就行了。
 -  
符合WAI应用程序界面。
 -  
默认使用快速的 Warp 网络服务器。
 
评论
