Skip to content

[proposal] Implement environment variables support for options #30

@thibaultcha

Description

@thibaultcha

Hi,

Would a contribution adding support for environment variables be accepted for options such as -c or --nginx?

The use case is using resty in a shebang as such:

#!/usr/bin/env resty -c 1024

This will only work on BSD-like platforms, and not Linux. We can mitigate this if we implement:

$ export RESTY_CLI_CONNECTION_COUNT=1024
$ export RESTY_CLI_NGINX=/path/to/nginx

Does this make sense? Which options would we like to see an environment variable for? I am thinking all but -e and the include directives (http, main, and -I), but let me know if not. Would you accept a contribution for RESTY_CLI_CONNECTION_COUNT only?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions