Skip to content

timholy/Bonsai.jl

 
 

Repository files navigation

Bonsai

Aqua QA codecov

This project is still in early development and likely to change pre 1.0

Installation

]add Bonsai

Documentation

A quick example

using Bonsai, HTTP

const app = App()

function index(stream::HTTP.Stream)
    query = Bonsai.read( stream, Query(name=Union{String, Nothing}))
    name = isnothing(query.name) ? "John Doe" : query.name  
    Bonsai.write(stream, Body("Hi, $name"))
end

app.get["/"] = index
start(app, port=9091)

For usage please see the documentation

About

A HTTP framework

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 98.2%
  • HTML 1.2%
  • TypeScript 0.6%