In the Good Place series, Chidi is one of the main character. It is main character's soulmate. Professor of the ethics who has problems with making decisions.
Chidi is the framework for creating application based on the http protocol.
It has very simple http server based on the
ev supervisors and fibers.
It brings very nice performance characteristics and modularity.
In contrast to other Janet web frameworks the core works only with strings of the request and response. Everything else is solved by the middleware. From parsing request (by Janet's PEG) to contructing response (by printing to buffer).
Right now there are these middleware:
Another module in the library is the response, which helps with creating,
you guessed it, http responses. The most important is
which transforms the response table, used for middleware communication,
into response string. On top of this function other specific response
functions are implemented. For example
success with status code 200,
not-found with status code 404.
Next there are couple of utility function for adding information to the
cookies for generating right
header. Another are functions for rendering response body
for encoding json response and
page for rendering html from the
Last function in the response module is
default-supervisor used in
the server for supervising the creation and handling the connection.