mirror of https://github.com/zer0bin-dev/zer0bin
compiled size optimizations
This commit is contained in:
parent
bc74ae66d0
commit
ee38af77fc
|
@ -19,3 +19,11 @@ chrono = { version = "0.4.19", features = ["serde"] }
|
|||
|
||||
nanoid = "0.4.0"
|
||||
|
||||
[profile.release]
|
||||
codegen-units = 1
|
||||
debug = false
|
||||
incremental = false
|
||||
lto = true
|
||||
opt-level = 3
|
||||
panic = "abort"
|
||||
debug-assertions = false
|
|
@ -4,10 +4,16 @@ use serde::{Deserialize, Serialize};
|
|||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub struct Config {
|
||||
pub server: ServerConfig,
|
||||
pub pastes: PastesConfig,
|
||||
pub databases: DatabasesConfig,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub struct ServerConfig {
|
||||
pub backend_port: u16,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone)]
|
||||
pub struct PastesConfig {
|
||||
pub character_limit: usize,
|
||||
|
|
|
@ -138,7 +138,7 @@ async fn main() -> io::Result<()> {
|
|||
|
||||
let state = AppState { config, pool };
|
||||
|
||||
println!("🚀 zer0bin starting");
|
||||
println!("🚀 zer0bin is running");
|
||||
|
||||
HttpServer::new(move || {
|
||||
let cors = Cors::default()
|
||||
|
|
Loading…
Reference in New Issue