feat: set port configurable
This commit is contained in:
1 parent
c9d98820c6
commit
c54d467730
3 files changed
+12
-9
No files matched your search
@@ -40,6 +40,11 @@ pub struct ConfigOptsServe {
|
||||
#[clap(parse(from_os_str))]
|
||||
pub target: Option<PathBuf>,
|
||||
|
||||
/// Port of dev server
|
||||
#[clap(long)]
|
||||
#[clap(default_value_t = 8080)]
|
||||
pub port: u16,
|
||||
|
||||
/// Build a example [default: ""]
|
||||
#[clap(long)]
|
||||
pub example: Option<String>,
|
||||
|
||||
@@ -69,7 +69,7 @@ impl Serve {
|
||||
Serve::regen_dev_page(&crate_config)?;
|
||||
|
||||
// start the develop server
|
||||
server::startup(crate_config.clone()).await?;
|
||||
server::startup(self.serve.port, crate_config.clone()).await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user