♻️ Migra API pública de actix-web a Axum
- `configure_service` como `configure_router(Router) -> Router`. - Macro `static_files_service!` como `serve_static_files!`. - `ResultPage<M, E>` eliminado; handlers devuelven `Result<M, E>`. - `ErrorPage` implementa `IntoResponse` en lugar de `ResponseError`. - Registro con `OnceLock`; eliminados `drop_extensions` y `app.welcome`. - `Redirect` devuelve `Response`; docs y ejemplos actualizados.
This commit is contained in:
parent
019961ed77
commit
c1afe0e70c
30 changed files with 393 additions and 355 deletions
|
|
@ -20,27 +20,26 @@ pub use log_format::LogFormat;
|
|||
|
||||
include_config!(SETTINGS: Settings => [
|
||||
// [app]
|
||||
"app.name" => "PageTop App",
|
||||
"app.description" => "Developed with the amazing PageTop framework.",
|
||||
"app.theme" => "Basic",
|
||||
"app.lang_negotiation" => "Full",
|
||||
"app.startup_banner" => "Slant",
|
||||
"app.welcome" => true,
|
||||
"app.name" => "PageTop App",
|
||||
"app.description" => "Developed with the amazing PageTop framework.",
|
||||
"app.theme" => "Basic",
|
||||
"app.lang_negotiation" => "Full",
|
||||
"app.startup_banner" => "Slant",
|
||||
|
||||
// [dev]
|
||||
"dev.pagetop_static_dir" => "",
|
||||
"dev.pagetop_static_dir" => "",
|
||||
|
||||
// [log]
|
||||
"log.enabled" => true,
|
||||
"log.tracing" => "Info",
|
||||
"log.rolling" => "Stdout",
|
||||
"log.path" => "log",
|
||||
"log.prefix" => "tracing.log",
|
||||
"log.format" => "Full",
|
||||
"log.enabled" => true,
|
||||
"log.tracing" => "Info",
|
||||
"log.rolling" => "Stdout",
|
||||
"log.path" => "log",
|
||||
"log.prefix" => "tracing.log",
|
||||
"log.format" => "Full",
|
||||
|
||||
// [server]
|
||||
"server.bind_address" => "localhost",
|
||||
"server.bind_port" => 8080,
|
||||
"server.bind_address" => "localhost",
|
||||
"server.bind_port" => 8080,
|
||||
]);
|
||||
|
||||
// **< Settings >***********************************************************************************
|
||||
|
|
@ -84,11 +83,6 @@ pub struct App {
|
|||
/// Banner ASCII mostrado al inicio: *"Off"* (desactivado), *"Slant"*, *"Small"*, *"Speed"* o
|
||||
/// *"Starwars"*.
|
||||
pub startup_banner: StartupBanner,
|
||||
/// Activa la página de bienvenida de PageTop.
|
||||
///
|
||||
/// Si está activada, se instala la extensión [`Welcome`](crate::base::extension::Welcome), que
|
||||
/// ofrece una página de bienvenida predefinida en `"/"`.
|
||||
pub welcome: bool,
|
||||
/// Modo de ejecución, dado por la variable de entorno `PAGETOP_RUN_MODE`, o *"default"* si no
|
||||
/// está definido.
|
||||
pub run_mode: String,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue