openresty / openresty/resty-cli
[proposal] Implement environment variables support for options
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 269
- Forks
- 59
- Avg merge
- 1h 35m
- Merged PRs (30d)
- 2
Description
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!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by locating the option-parsing code for -c and --nginx, then review how existing CLI options are defined; done means agreeing on the supported RESTY_CLI_* variables and their behavior, with coverage for the accepted scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100