From 1769baea084b9e414bfd8e24e942d119d8653348 Mon Sep 17 00:00:00 2001 From: Akshay Date: Mon, 24 Aug 2020 18:43:06 +0530 Subject: add crate meta --- Cargo.toml | 9 +++++++-- LICENSE | 20 ++++++++++++++++++++ readme.md | 10 ++++++++++ src/service.rs | 1 + 4 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 LICENSE diff --git a/Cargo.toml b/Cargo.toml index 0ab5f8f..1f5ecf4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,8 +3,13 @@ name = "hedge" version = "0.1.0" authors = ["Akshay "] edition = "2018" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +description = "minimal url shortner" +homepage = "https://github.com/nerdypepper/hedge" +repository = "https://github.com/nerdypepper/hedge" +readme = "./readme.md" +keywords = [ "url", "server", "url shortner" ] +categories = [ "asynchronous", "compression" ] +license = "MIT" [dependencies] hyper = "0.13" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..b7f6959 --- /dev/null +++ b/LICENSE @@ -0,0 +1,20 @@ +Copyright 2018 Akshay Oppiliappan (nerdy@peppe.rs) + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/readme.md b/readme.md index 48a59ff..a6693e6 100644 --- a/readme.md +++ b/readme.md @@ -2,6 +2,8 @@ > minimal url shortner +hosted instance: [isosta.tk](https://isosta.tk). + ### build ``` @@ -24,3 +26,11 @@ Options --port Port to start the server on (default: 3000) --database Path to database (default: urls.db_3) ``` + +### logging + +start with + +```shell +$ RUST_LOG=hedge=trace hedge +``` diff --git a/src/service.rs b/src/service.rs index 6526d15..2908bc8 100644 --- a/src/service.rs +++ b/src/service.rs @@ -26,6 +26,7 @@ This URL shortening service is powered by hedge. github.com/nerdypepper/hedge To shorten urls: + curl -F'shorten=https://shorten.some/long/url' {}\n", String::from_utf8_lossy(host) ); -- cgit v1.2.3