Skip to content

marteinn/Vaja-Bob

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vaja-Bob

A micro web framework for Väja.

Example

import Bob

let app = \
  Bob.new() \
  |> Bob.addMiddlewares([Bob.debugMiddleware, Bob.rendererMiddleware]) \
  |> Bob.addRoute404(fn(conn, _) -> {"status": 404, "body": "Page not found"}) \
  |> Bob.addRoutes([
    [
      Bob.newPath("/artist/([a-z]*)/"),
      fn(_conn, args) -> Bob.newJSONResponse({"status": 200, "context": {
        "artist": args[0]
      }})
    ]
  ])

Http.createServer() \
|> Http.addHandler(
  app |> Bob.makeHandler()
) \
|> Http.listen(8080)

License

This project is released under the MIT License.

About

A micro web framework for Väja.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published