Binah (or Express.hs, if you're feeling funny) is a lightweight web framework for Haskell that allows you to quickly build web applications with minimal boilerplate. It provides routing, request handling, and features it's own templating engine (HSHTML) that just feels right.
Read the full documentation in DOCUMENTATION.md.
import Binah
main :: IO ()
main = do
route GET "/" $ \(req, res) -> do
putStrLn "Welcome to Binah!"
res 200 (send "Hello, World!")
runServer 8080Simplicity. Yesod is great, but syntax-heavy and too complex for beginners to pick up quickly. Binah aims to be as simple as possible while still being powerful enough for small to medium web applications.
Binah is not about type-safety or advanced features; it's about getting things done quickly and easily.
- Simple routing with support for RESTful requests.
- Easy request and response handling.
- Built-in JSON response support.
- HSHTML templating engine for dynamic HTML generation.
- Minimal dependencies and easy to set up.
HSHTML is a simple templating engine that allows you to embed Haskell code directly within your HTML files. It supports variable interpolation, conditionals, loops, and unescaped content. Inspired by Razor and EJS, HSHTML makes it easy to create dynamic web pages.
<!DOCTYPE html>
<html>
<head>
<title>@{ title }</title>
</head>
<body>
<h1>@{ title }</h1>
<p>Hello, @{message}!</p>
</body>
</html>- Add middleware support (logging, CORS, etc.)
- Implement session management and cookies
- Improve error handling and debugging features
- Expand HSHTML features (partials, layouts, etc.)
- Write comprehensive documentation and examples
- Create a package for easy installation via Cabal or Stack
- Add unit tests and integration tests
- Optimize performance for handling concurrent requests