Add proper shutdown, rate limits, config validation, cors config, fix dangling cursors, cache regex, merge created texts
This commit is contained in:
parent
4763bc9d04
commit
e15b0f9903
28 changed files with 1277 additions and 464 deletions
|
|
@ -41,11 +41,12 @@ async fn main() -> ExitCode {
|
|||
}
|
||||
};
|
||||
|
||||
let mut result = set_up_logging(&args, &config.logging);
|
||||
|
||||
if result.is_ok() {
|
||||
result = start_server(config).await;
|
||||
let result = async {
|
||||
config.validate().map_err(init_error)?;
|
||||
set_up_logging(&args, &config.logging)?;
|
||||
start_server(config).await
|
||||
}
|
||||
.await;
|
||||
|
||||
match result {
|
||||
Ok(()) => ExitCode::SUCCESS,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue