mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
feat(backend) rebuild start
This commit is contained in:
45 files changed
+69
-2029
No files matched your search
@@ -0,0 +1 @@
|
||||
pub const PAGE_SIZE: u32 = 6;
|
||||
@@ -0,0 +1,48 @@
|
||||
// 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 const BLOG_GIT_URL: &str = "BLOG_GIT_URL";
|
||||
pub const BLOG_GIT_REMOTE_BRANCH: &str = "BLOG_GIT_REMOTE_BRANCH";
|
||||
pub const BLOG_GIT_REMOTE_NAME: &str = "BLOG_GIT_REMOTE_NAME";
|
||||
}
|
||||
|
||||
pub mod default_value {
|
||||
pub const WORK_DIR: &str = "~/.nocturne";
|
||||
pub const BLOG_GIT_REMOTE_BRANCH: &str = "master";
|
||||
pub const BLOG_GIT_REMOTE_NAME: &str = "origin";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
pub mod blog;
|
||||
pub mod config;
|
||||
pub mod time;
|
||||
@@ -0,0 +1,2 @@
|
||||
pub const DEFAULT_TIME_FORMAT: &str = "%Y-%m-%dT%H:%M:%S%z";
|
||||
pub const DEFAULT_DATE_FORMAT: &str = "%Y-%m-%d%zT%H%M%S";
|
||||
@@ -0,0 +1,7 @@
|
||||
mod constants;
|
||||
|
||||
const BUILD_ID: &str = env!("BUILD_ID");
|
||||
|
||||
fn main() {
|
||||
println!("{}", BUILD_ID);
|
||||
}
|
||||
Reference in new issue
Block a user