haskyapi: HTTP server

[ deprecated, library, mit, program, web ] [ Propose Tags ]

Haskell HTTP server.

[Skip to Readme]
Versions [faq],
Dependencies aeson, base (>=4.7 && <5), blaze-html, bytestring, containers, directory, haskyapi, http-conduit, markdown, mtl, network, parsec, persistent, persistent-sqlite, persistent-template, split, tagsoup, text, time, utf8-string [details]
License MIT
Copyright 2017 okue
Author okue
Maintainer nogideca@gmail.com
Category Web
Home page https://github.com/okue/haskyapi#readme
Bug tracker https://github.com/okue/haskyapi/issues
Source repo head: git clone https://github.com/okue/haskyapi
Uploaded by okue at 2018-02-09T03:12:08Z
Distributions NixOS:
Executables haskyapi
Downloads 988 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-02-09 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for haskyapi-

[back to package description]

<img src="https://raw.githubusercontent.com/okue/Haskyapi/master/html/img/logo.png" width="60%">

Build Status

What is Haskyapi?

Haskyapi is a HTTP server implemented in Haskell.


$ stack build
$ stack install
$ haskyapi migrate
$ haskyapi runserver --port 8080 --root .
root: .
listen on 8080


$ cabal build


  • -p, --port : port number
  • -r, --root : root directory
  • -h, --help : help

setting.yml is a configuration file for these options.

How to use as web framework

app/Main.hs in this repository is an example program using haskyapi as web framework.

Here is a very simple example.

module Main where
import Web.Haskyapi.Console.Cli (haskyapi)
import Web.Haskyapi.Header (
  ApiFunc,        -- type of api functions
  Method(..),     -- GET, POST, ...
  ContentType(..) -- Cplain, Cjson, ...

routing :: [Api]
routing = [
             (GET,  "/test", test, Cplain)
            ,(POST, "/test", test, Cplain)

test :: ApiFunc
test qry _ = return "This is GET."
test qry _ = return "This is POST."

main = haskyapi routing


  • [x] Open Markdown file
  • [ ] Use Database easily
  • [ ] Implement RESTful api easily
  • [ ] Automatic generator of api reference document
  • [ ] HTTPS


.haskyapi.bash is a bash-completion setting file for haskyapi command.


Haskyapi works at okue.site:80