mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 18:36:21 +00:00
ref(global) move modules, extract constants
This commit is contained in:
10 files changed
+216
-152
No files matched your search
@@ -0,0 +1,43 @@
|
||||
// Database related
|
||||
pub mod database {
|
||||
pub mod var_name {
|
||||
pub const URI: &str = "DATABASE_URL";
|
||||
pub const USERNAME: &str = "POSTGRES_USER";
|
||||
pub const PASSWORD: &str = "POSTGRES_PASSWORD";
|
||||
pub const HOST: &str = "POSTGRES_HOST";
|
||||
pub const PORT: &str = "POSTGRES_PORT";
|
||||
pub const DBNAME: &str = "POSTGRES_DB";
|
||||
}
|
||||
|
||||
pub mod default_value {
|
||||
pub const USERNAME: &str = "";
|
||||
pub const PASSWORD: &str = "";
|
||||
pub const HOST: &str = "localhost";
|
||||
pub const PORT: &str = "5432";
|
||||
pub const DBNAME: &str = "nocturne";
|
||||
pub const DATABASE_TYPE: &str = "postgresql";
|
||||
}
|
||||
}
|
||||
|
||||
pub mod server {
|
||||
pub mod var_name {
|
||||
pub const PORT: &str = "BACKEND_PORT";
|
||||
pub const HOST: &str = "BACKEND_HOST";
|
||||
}
|
||||
|
||||
pub mod default_value {
|
||||
pub const PORT: u32 = 3001;
|
||||
pub const HOST: &str = "0.0.0.0";
|
||||
}
|
||||
}
|
||||
|
||||
pub mod general {
|
||||
pub mod var_name {
|
||||
pub const LOG_DIR: &str = "LOG_DIR";
|
||||
pub const WORK_DIR: &str = "WORK_DIR";
|
||||
}
|
||||
|
||||
pub mod default_value {
|
||||
pub const WORK_DIR: &str = "~/.nocturne";
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user