feat: add command line arguments
This commit is contained in:
16
src/types/config.rs
Normal file
16
src/types/config.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Config {
|
||||
http_addr: String,
|
||||
database_path: String,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn new() -> Config {
|
||||
Config {
|
||||
http_addr: String::from("127.0.0.1:4000"),
|
||||
database_path: String::from("/tmp/rustysearch.db"),
|
||||
}
|
||||
}
|
||||
}
|
@@ -1 +1,2 @@
|
||||
pub mod app_state;
|
||||
pub mod app_state;
|
||||
pub mod config;
|
||||
|
Reference in New Issue
Block a user