From 32f6de778dabaaa67b6e63a89e99ed535988d1a3 Mon Sep 17 00:00:00 2001 From: LordMZTE Date: Thu, 24 Jun 2021 16:25:44 +0200 Subject: [PATCH] add readme --- README.md | 2 ++ defaultconfig.toml | 5 ++++- src/config.rs | 1 - 3 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9ceb254 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# brevo +URL shortener written in rust using the warp web server and MySQL diff --git a/defaultconfig.toml b/defaultconfig.toml index 51689a7..9d46eeb 100644 --- a/defaultconfig.toml +++ b/defaultconfig.toml @@ -1,5 +1,8 @@ +# database URL including username, password, IP, port and database database_url = "mysql://brevo:brevo@127.0.0.1:3306/brevo" -database = "brevo" +# address to bind the HTTP server to bind_addr = "127.0.0.1:3001" +# length of the suffix of shortened URLs link_len = 6 +# base URL where the service is reployed, used for displaying shortened URLs to users base_url = "http://127.0.0.1:3001/" diff --git a/src/config.rs b/src/config.rs index 44f8182..8c8494e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -7,7 +7,6 @@ use url::Url; pub struct Config { pub database_url: String, pub bind_addr: SocketAddr, - pub database: String, pub link_len: u8, pub base_url: Url, }