Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement configuration files #23

Open
arusa opened this issue Mar 24, 2024 · 3 comments
Open

Implement configuration files #23

arusa opened this issue Mar 24, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@arusa
Copy link
Collaborator

arusa commented Mar 24, 2024

The max length of secrets (validation in Bin model) should be configurable.

We need a way to allow configuration files like initializers in rails.

@mrusa
Copy link
Collaborator

mrusa commented Mar 28, 2024

Besides the secrets max-length, the following values could also be stored in some kind of config var:

  • expires after (currently a database default)
  • default port (hardcoded to 9292)

I would store this vars in a yaml file, just like database.yml. Maybe also overridable via ENV?

I'm not sure if there really is a need for rails like initializers, but here is an archived github project to get some inspration how this could be archived: https://github.com/chadwpry/sinatra-initializers

@mrusa
Copy link
Collaborator

mrusa commented Mar 28, 2024

Oh and https://sinatrarb.com/contrib/ also looks interesting.

It has https://sinatrarb.com/contrib/config_file to load YAML files. And there are other helpful things like https://sinatrarb.com/contrib/required_params included as well.

@whotwagner
Copy link
Collaborator

I implemented sinatra/config_files with the last PR. So now it's just a matter of using the config_file

@whotwagner whotwagner added the enhancement New feature or request label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants