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:

  1. 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.

  2. 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'.

  3. file storage - all files should be stored using the Useless::FS instance. provided in the env by 'useless.fs'. Any file stored using Useless::FS is assigned an ID and is served from the '/files/[ID]' endpoint.

  4. logging - the platform sets up a logger appropriate for the environment. It can be accessed using 'useless.logger' environment key.