bird: A simple, sinatra-inspired web framework.

[ bsd3, library, program, web ] [ Propose Tags ]

Bird is a hack-compatible framework for simple websites.


[Skip to Readme]

Modules

[Last Documentation]

  • Bird
    • Bird.Reply
      • Bird.Reply.Codes
    • Bird.Request

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.0.1, 0.0.2, 0.0.3, 0.0.6, 0.0.7, 0.0.8, 0.0.9, 0.0.10, 0.0.11, 0.0.12, 0.0.13, 0.0.14, 0.0.15, 0.0.16, 0.0.17, 0.0.18, 0.0.19
Dependencies base (>=4.0 && <5), bytestring, containers, data-default (>=0.2), hack (>=2009.10.30), hack-handler-happstack, haskell98, process [details]
License BSD-3-Clause
Author Parker, Matt
Maintainer Parker, Matt <moonmaster9000@gmail.com>
Category Web
Home page http://github.com/moonmaster9000/bird
Uploaded by MattParker at 2010-06-27T22:43:30Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables bird
Downloads 12595 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2016-12-29 [all 8 reports]

Readme for bird-0.0.3

[back to package description]

Bird

A sinatra-ish web framework written in haskell, riding on top of Hack.

Why?

Sinatra has a beautiful, simple, elegant syntax, but it's essentially an attempt to bring pattern matching to a language never intended for pattern matching. Why not attempt something similar in a language with not just beautiful pattern matching, but with all the declarative bells and whistles: lazy evaluation, first-class functions, currying, polymorphism?

Install

$ cabal update && cabal install bird

Note: make sure $HOME/.cabal/bin is in your PATH.

Create an app

$ bird MyApp 

Compile your app

$ cd MyApp
$ bird nest 

Start your app (runs on port 3000)

$ bird fly

Try it out

$ curl http://localhost:3000
  404 Not Found

Improvise!

-- MyApp.hs
module MyApp where
import Bird
import Data.String.Utils

get, post, put, delete :: Request -> IO Reply
get Request { path = ("howdy":xs) } 
  = ok $ ("Howdy " ++) $ join ", " xs

get _ = return notFound_
post _ = return notFound_
put _ = return notFound_
delete _ = return notFound_

Notes

This project is still in its infancy. Coming features:

  • logging
  • support for sending files