在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):scotty-web/scotty开源软件地址(OpenSource Url):https://github.com/scotty-web/scotty开源编程语言(OpenSource Language):Haskell 99.9%开源软件介绍(OpenSource Introduction):ScottyA Haskell web framework inspired by Ruby's Sinatra, using WAI and Warp. {-# LANGUAGE OverloadedStrings #-}
import Web.Scotty
import Data.Monoid (mconcat)
main = scotty 3000 $
get "/:word" $ do
beam <- param "word"
html $ mconcat ["<h1>Scotty, ", beam, " me up!</h1>"] Scotty is the cheap and cheerful way to write RESTful, declarative web applications.
See examples/basic.hs to see Scotty in action. (basic.hs needs the wai-extra package) > runghc examples/basic.hs
Setting phasers to stun... (port 3000) (ctrl-c to quit)
(visit localhost:3000/somepath) As for the name: Sinatra + Warp = Scotty. More InformationTutorials and related projects can be found in the Scotty wiki. Development & SupportOpen an issue on GitHub. Copyright (c) 2012-2019 Andrew Farmer FAQ
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论