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

support binding and port in cli command #402

Merged
merged 5 commits into from
Jan 28, 2024

Conversation

kaplanelad
Copy link
Contributor

No description provided.

@@ -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),
Copy link
Contributor

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 {
Copy link
Contributor

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?

@kaplanelad kaplanelad merged commit 3e913e8 into master Jan 28, 2024
10 checks passed
@mikosco4real
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants