mirror of
https://github.com/YGGverse/rssto.git
synced 2026-03-31 17:15:29 +00:00
use config file instead of argument options
This commit is contained in:
parent
ec0cca64f3
commit
3e94399ccb
15 changed files with 162 additions and 123 deletions
|
|
@ -6,7 +6,7 @@ update = 900
|
|||
[mysql]
|
||||
host = "localhost"
|
||||
port = 3306
|
||||
user = ""
|
||||
username = ""
|
||||
password = ""
|
||||
database = "rssto"
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ pub struct Mysql {
|
|||
pub host: String,
|
||||
pub password: String,
|
||||
pub port: u16,
|
||||
pub user: String,
|
||||
pub username: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ fn main() -> Result<()> {
|
|||
let db = mysql::Database::pool(
|
||||
&config.mysql.host,
|
||||
config.mysql.port,
|
||||
&config.mysql.user,
|
||||
&config.mysql.username,
|
||||
&config.mysql.password,
|
||||
&config.mysql.database,
|
||||
)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue