Bonsai.jl

A HTTP framework
Author onetonfoot
Popularity
14 Stars
Updated Last
11 Months Ago
Started In
October 2019

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