Babbas is currently used as the Media endpoint for my personal website (https://deeden.co.uk/) and, as such, is configured to work for me. It should work for someone else if properly configured (via
.env). For my purposes I run Babbas through Passenger on a Dreamhost VPS.
Use of the application requires a number of environment variables to be specified, while others are optional. It does support dotenv if that floats your boat.
|ENDPOINT_URL||URL||The domain you want to serve media from. For example, I serve the files from
|ENDPOINT_BASE||Directory path||The base directory for where your media will be stored.|
|DATA_DIRECTORY||Directory path||A more specific directory (within
|TOKEN_ENDPOINT||URL||The token endpoint used to verify any IndieAuth token|
|DOMAIN||URL||The domain any IndieAuth token will be verified to be valid for|
What is the difference between
DATA_DIRECTORY, you ask?
Let's say that you want to store your media in the
/www/media/ directory, and have your media links served from the root of a site, such as
https://example.com/. In that case you would set the following values (similar to what I use)...
However maybe you'd prefer to serve your media from a different path, such as
https://example.com/photos/. In this case you could configure it as follows...
This results in
photos being included correctly included in both the path used to save the file, and the url used to refer to the file.
Babbas uses the IndieAuth::TokenVerification ruby gem to verify an IndieAuth access token against a token endpoint, and the
DOMAIN environment variables are required by that gem.
TOKEN_ENDPOINT specifies the token endpoint to be used to validate the access token. Failure to specify
TOKEN_ENDPOINT will result in a
IndieAuth::TokenVerification::MissingTokenEndpointError error being raised.
DOMAIN specifies the domain we expect to see in the response from the validated token. It should match that specified when the token was first generated (presumably your website URL). Failure to specify
DOMAIN will result in a
IndieAuth::TokenVerification::MissingDomainError error being raised.
While Babbas is written with a view to "self-dogfooding" I'm still happy for other people to use and contribute to the project. Bug reports can be added at https://code.deeden.co.uk/babbas/issues, while patches are welcome at https://code.deeden.co.uk/babbas/patches.
This application is available as open source under the terms of the MIT License.
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
Babbas is a genie from the TV series Yonderland. He is tasked with looking after a video message for one of the lead characters, hence his use as the name for my media endpoint.