-
-
Notifications
You must be signed in to change notification settings - Fork 295
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
support binding and port in cli command #402
Conversation
@@ -283,7 +294,14 @@ pub async fn main<H: Hooks, M: MigratorTrait>() -> eyre::Result<()> { | |||
}; | |||
|
|||
let boot_result = create_app::<H, M>(start_mode, &environment).await?; | |||
start(boot_result).await?; | |||
let serve_config = ServeConfig { | |||
port: port.map_or(boot_result.app_context.config.server.port, |p| p), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it just .or(...)
? (since the map is identity)
src/cli.rs
Outdated
@@ -283,7 +294,14 @@ pub async fn main<H: Hooks, M: MigratorTrait>() -> eyre::Result<()> { | |||
}; | |||
|
|||
let boot_result = create_app::<H, M>(start_mode, &environment).await?; | |||
start(boot_result).await?; | |||
let serve_config = ServeConfig { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe rename to ServeParams
so we know it didn't come directly from config?
Nicely done @kaplanelad, I did not think about approaching it this way. Always something new to learn. I think what's left is to update loco docs so users can know how to use the newly added flags to manage their server address and port. |
No description provided.