This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
The mellon-web package wraps a mellon-core controller in a REST
web service, making it possible to control physical access devices
from an HTTP client. The package includes both a WAI application
server, and native Haskell client bindings for the service.
Like the mellon-core controller interface, the mellon-web REST API
is quite simple. There are only 3 methods:
GET /time returns the system time on the server. This is made
available for diagnostic purposes, primarily to ensure the server
has an accurate clock.
GET /state returns the controller's current state (either Locked
or Unlocked date where date is the UTC time at which the
controller will automatically lock again).
PUT /state sets the controller's current state. Use this method to
lock and unlock the controller.
For detailed documentation, the server includes a self-documenting
Swagger spec.
Note that the mellon-web server does not provide an authentication
mechanism! You should proxy it behind a secure, authenticating HTTPS
server such as Nginx.