Modifica la estructura general del código fuente
Importante actualización que reorganiza el código fuente de PageTop. Usa Cargo para crear un espacio de trabajo con los diferentes proyectos que estructuran las funcionalidades de PageTop en módulos interdependientes que se integran en Drust para construir una solución web para la gestión de contenidos.
This commit is contained in:
parent
4b5d8ce38a
commit
ab0ac11f65
83 changed files with 115 additions and 81 deletions
79
Cargo.toml
79
Cargo.toml
|
|
@ -1,74 +1,5 @@
|
|||
[package]
|
||||
name = "pagetop"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
authors = [
|
||||
"Manuel Cillero <manuel@cillero.es>"
|
||||
]
|
||||
description = """\
|
||||
PageTop es un proyecto personal para aprender Rust. Incluye algunos de los \
|
||||
crates más estables y populares para desarrollar soluciones web modulares, \
|
||||
extensibles y configurables. También es un sistema para la gestión de \
|
||||
contenidos web.\
|
||||
"""
|
||||
homepage = "https://suitepro.cillero.es/projects/pagetop"
|
||||
repository = "https://gitlab.com/manuelcillero/pagetop"
|
||||
license = "MIT"
|
||||
|
||||
keywords = [
|
||||
"web", "cms", "framework", "frontend", "ssr"
|
||||
]
|
||||
categories = [
|
||||
"web-programming", "development-tools", "gui"
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
doc-comment = "0.3.3"
|
||||
downcast-rs = "1.2.0"
|
||||
figlet-rs = "0.1.3"
|
||||
futures = "0.3"
|
||||
once_cell = "1.9.0"
|
||||
url = "2.2.2"
|
||||
|
||||
config_rs = { package = "config", version = "0.11.0", features = ["toml"] }
|
||||
|
||||
tracing = "0.1"
|
||||
tracing-appender = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
|
||||
tracing-actix-web = "0.2"
|
||||
|
||||
fluent-templates = "0.6.1"
|
||||
unic-langid = "0.9.0"
|
||||
|
||||
actix-web = "3.3.3"
|
||||
actix-web-static-files = "3.0.5"
|
||||
|
||||
maud = { version = "0.23.0", features = ["actix-web"] }
|
||||
sycamore = { version = "0.7.1", features = ["ssr"] }
|
||||
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
[dependencies.sea-orm]
|
||||
version = "0.6"
|
||||
features = ["debug-print", "macros", "runtime-async-std-native-tls"]
|
||||
default-features = false
|
||||
|
||||
[dependencies.sea-schema]
|
||||
version = "0.5"
|
||||
features = ["debug-print", "migration"]
|
||||
default-features = false
|
||||
|
||||
[features]
|
||||
default = ["mysql"]
|
||||
mysql = ["sea-orm/sqlx-mysql"]
|
||||
postgres = ["sea-orm/sqlx-postgres"]
|
||||
|
||||
[build-dependencies]
|
||||
actix-web-static-files = "3.0.5"
|
||||
|
||||
[lib]
|
||||
name = "pagetop"
|
||||
|
||||
[[bin]]
|
||||
name = "pagetop"
|
||||
[workspace]
|
||||
members = [
|
||||
"drust",
|
||||
"pagetop",
|
||||
]
|
||||
|
|
@ -1,3 +1,20 @@
|
|||
[app]
|
||||
name = "PageTop Essence"
|
||||
description = "A modern Content Management System for sharing the world."
|
||||
name = "Drust"
|
||||
description = """\
|
||||
A modern Content Management System for sharing the world.\
|
||||
"""
|
||||
language = "es-ES"
|
||||
#theme = "Aliner"
|
||||
#theme = "Minimal"
|
||||
theme = "Bootsier"
|
||||
|
||||
[database]
|
||||
db_name = "drust"
|
||||
db_user = "drust"
|
||||
db_pass = "DrU__#3T"
|
||||
|
||||
[log]
|
||||
tracing = "Info"
|
||||
#Info,actix_server::builder=Error,tracing_actix_web=Warn"
|
||||
rolling = "Stdout"
|
||||
format = "Compact"
|
||||
|
|
|
|||
19
drust/Cargo.toml
Normal file
19
drust/Cargo.toml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
[package]
|
||||
name = "drust"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
authors = [
|
||||
"Manuel Cillero <manuel@cillero.es>"
|
||||
]
|
||||
description = """\
|
||||
A modern Content Management System for sharing the world.\
|
||||
"""
|
||||
homepage = "https://suitepro.cillero.es/projects/drust"
|
||||
repository = "https://gitlab.com/manuelcillero/drust"
|
||||
|
||||
[dependencies]
|
||||
pagetop = { path = "../pagetop" }
|
||||
actix-web = "3.3.3"
|
||||
maud = { version = "0.23.0" }
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
|
@ -1,8 +1,4 @@
|
|||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
// ```
|
||||
// let app = pagetop::Application::build(None).await?;
|
||||
// app.run()?.await
|
||||
// ```
|
||||
pagetop::Application::build(None).await?.run()?.await
|
||||
}
|
||||
71
pagetop/Cargo.toml
Normal file
71
pagetop/Cargo.toml
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
[package]
|
||||
name = "pagetop"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
authors = [
|
||||
"Manuel Cillero <manuel@cillero.es>"
|
||||
]
|
||||
description = """\
|
||||
PageTop es un proyecto personal para aprender Rust. Incluye algunos de los \
|
||||
crates más estables y populares para desarrollar soluciones web modulares, \
|
||||
extensibles y configurables. También es un sistema para la gestión de \
|
||||
contenidos web.\
|
||||
"""
|
||||
homepage = "https://suitepro.cillero.es/projects/pagetop"
|
||||
repository = "https://gitlab.com/manuelcillero/pagetop"
|
||||
license = "MIT"
|
||||
|
||||
keywords = [
|
||||
"web", "cms", "framework", "frontend", "ssr"
|
||||
]
|
||||
categories = [
|
||||
"web-programming", "development-tools", "gui"
|
||||
]
|
||||
|
||||
[dependencies]
|
||||
doc-comment = "0.3.3"
|
||||
downcast-rs = "1.2.0"
|
||||
figlet-rs = "0.1.3"
|
||||
futures = "0.3"
|
||||
once_cell = "1.9.0"
|
||||
url = "2.2.2"
|
||||
|
||||
config_rs = { package = "config", version = "0.11.0", features = ["toml"] }
|
||||
|
||||
tracing = "0.1"
|
||||
tracing-appender = "0.2"
|
||||
tracing-subscriber = { version = "0.3", features = ["json", "env-filter"] }
|
||||
tracing-actix-web = "0.2"
|
||||
|
||||
fluent-templates = "0.6.1"
|
||||
unic-langid = "0.9.0"
|
||||
|
||||
actix-web = "3.3.3"
|
||||
actix-web-static-files = "3.0.5"
|
||||
|
||||
maud = { version = "0.23.0", features = ["actix-web"] }
|
||||
sycamore = { version = "0.7.1", features = ["ssr"] }
|
||||
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
|
||||
[dependencies.sea-orm]
|
||||
version = "0.6"
|
||||
features = ["debug-print", "macros", "runtime-async-std-native-tls"]
|
||||
default-features = false
|
||||
|
||||
[dependencies.sea-schema]
|
||||
version = "0.5"
|
||||
features = ["debug-print", "migration"]
|
||||
default-features = false
|
||||
|
||||
[features]
|
||||
default = ["mysql"]
|
||||
mysql = ["sea-orm/sqlx-mysql"]
|
||||
postgres = ["sea-orm/sqlx-postgres"]
|
||||
|
||||
[build-dependencies]
|
||||
actix-web-static-files = "3.0.5"
|
||||
|
||||
[lib]
|
||||
name = "pagetop"
|
||||
|
|
@ -47,7 +47,7 @@ impl Application {
|
|||
|
||||
// Inicializa la conexión con la base de datos.
|
||||
trace::info!(
|
||||
"Connecting to database \"{}\" with a pool of {} connections.",
|
||||
"Connecting to database \"{}\" using a pool of {} connections.",
|
||||
&SETTINGS.database.db_name,
|
||||
&SETTINGS.database.max_pool_size
|
||||
);
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Add table
Add a link
Reference in a new issue