2import Network.Wai.Handler.SimpleServer
3import qualified Data.ByteString.Char8 as B8
4import qualified Data.ByteString as B
7main = putStrLn "http://localhost:3000/" >> run 3000 app
10app req = case B8.unpack $ pathInfo req of
11 "/post/" -> postResponse $ requestBody req
14indexResponse :: IO Response
15indexResponse = return Response
17 , headers = [(ContentType, B8.pack "text/html")]
21postResponse :: IO (Maybe B.ByteString) -> IO Response
22postResponse rb = return Response
24 , headers = [(ContentType, B8.pack "text/plain")]
25 , body = Right $ postBody rb
28index :: Either FilePath a
29index = Left "index.html"
31postBody :: IO (Maybe B.ByteString) -> Enumerator
32postBody req = Enumerator $ \f a -> helper f a where
41 Right a' -> helper f a'
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list