Skip to content

πŸŒ™ A small, easily-understandable web framework for Haskell

Notifications You must be signed in to change notification settings

harrisonturton/apollo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŒ™ Apollo

For Haskell beginners, the barrier to writing "real-world" programs is high. We have to push through alien syntax, a strict compiler before finally tackling the mountain that is Control.Monad.

Current frameworks are confusing for beginners, with nested monads and arcane symbols β€” what the heck does <|> mean?

Apollo is for people who've just finished LYAH. It features a small, readable (and well commented!) codebase. Only the simple Reader and State monads are exposed to the user.

Features

  • Simple API
  • Easy-to-understand types
  • Small codebase
  • Regex-matching routes

Installation

> git clone https://github.com/harrisonturton/apollo.git

Usage

The canonical "Hello World" server that runs at localhost:3000:

import Apollo

main = apollo 3000 $ do
  get "/" $ do
    return $ status200 "Hello World!"

An echo server that runs at any subdomain localhost subdomain β€” e.g. localhost:3000/cat.

import Apollo

main = apollo 3000 $ do
  get "/[a-zA-Z]" $ do
    request <- get
    return $ (status200 . body) request

About

πŸŒ™ A small, easily-understandable web framework for Haskell

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published