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

RFE: Adding server IP address before port number in banner #253

Closed
tjyang opened this issue Dec 27, 2023 · 3 comments
Closed

RFE: Adding server IP address before port number in banner #253

tjyang opened this issue Dec 27, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@tjyang
Copy link
Contributor

tjyang commented Dec 27, 2023

Feature Request

Is your feature request related to a problem? Please describe.
Adding server IP address before port number in banner.
Provide a succinct and clear description of the problem. For example, I encounter an issue when...

Describe the solution you'd like
Assume server IP=192.168.241.128

environment: development
database: automigrate
logger: debug
compilation: release
modes: server

listening on 192.168.241.128 port 3000

Articulate a clear and concise depiction of your desired outcome.

Describe alternatives you've considered

Offer a clear and concise description of any alternative solutions or features you have contemplated.

@tjyang tjyang added the enhancement New feature or request label Dec 27, 2023
@jondot
Copy link
Contributor

jondot commented Dec 28, 2023

Im not sure a server can know its address in a reliable form (internal or external), unless it was bound to a specific one, I think we always bind to 0.0.0.0. Did you look at that area?

@tjyang
Copy link
Contributor Author

tjyang commented Dec 28, 2023

Default binding to 0.0.0.0 is most quick and easy way during development. But in production, when a server has multiple net interfaces, loco should be able to lock on particular interface when starting up.

  • Dynamically specify the host:port , may be -H and -p can be added as OPTIONS if one one to overwrite default 0.0.0.0:3000 ?
    Ex: clo-cli start -H http://192.168.1.2 -p 3001
[me@rocky9t01a demo]$ blo-cli
The one-person framework for Rust

Usage: blo-cli [OPTIONS] <COMMAND>

Commands:
  start     Start an app
  db   -      Perform DB operations
  routes    Describe all application endpoints
  task      Run a custom task
  generate  code generation creates a set of files and code templates based on a predefined set of rules
  doctor    Validate and diagnose configurations
  version   Display the app version
  help      Print this message or the help of the given subcommand(s)

Options:
  -e, --environment <ENVIRONMENT>  Specify the environment [default: development]
  -h, --help                       Print help
  -V, --version                    Print version
[me@rocky9t01a demo]$ blo-cli
  • or Display what was specified in config/development.yaml.
[me@rocky9t01a demo]$ egrep 'host\:\s' config/development.yaml
  host: http://localhost
    host: localhost              # <-- this is from mailer section.
[me@rocky9t01a demo]$

@kaplanelad
Copy link
Contributor

Done in pr: #402

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