Write default config if it doesn't exist
This commit is contained in:
parent
3f5409da60
commit
3c24ad83e1
4 changed files with 35 additions and 6 deletions
|
|
@ -31,3 +31,13 @@ fn default_max_body_size_mb() -> usize {
|
|||
);
|
||||
DEFAULT_MAX_BODY_SIZE_MB
|
||||
}
|
||||
|
||||
impl Default for ServerConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
host: default_host(),
|
||||
port: default_port(),
|
||||
max_body_size_mb: default_max_body_size_mb(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue