useless
A lightweight Rack stack that forms the platform for useless.io.
useless's primary responsibility is to dispatch requests to the APIs based upon subdomain. It also provides a minimal common interface that includes:
authentication - if a request can be authenticated by a supported strategy, the middleware will set the 'useless.user' environment key to the associated user record.
persistence - the platform provides access to a Mongo driver instance via the
Useless::Mongo
class. An instance is provided in the env via 'useless.mongo'.file storage - all files should be stored using the
Useless::FS
instance. provided in the env by 'useless.fs'. Any file stored usingUseless::FS
is assigned an ID and is served from the '/files/[ID]' endpoint.logging - the platform sets up a logger appropriate for the environment. It can be accessed using 'useless.logger' environment key.