diff options
author | Akshay <[email protected]> | 2020-08-24 14:13:06 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-08-24 14:13:06 +0100 |
commit | 1769baea084b9e414bfd8e24e942d119d8653348 (patch) | |
tree | 94274d2ab13ed093d8eb72df1d26196ede29a19c | |
parent | 4f83c8c353d25a1e2bf5c4859428bb2c3f1c04bb (diff) |
add crate meta
-rw-r--r-- | Cargo.toml | 9 | ||||
-rw-r--r-- | LICENSE | 20 | ||||
-rw-r--r-- | readme.md | 10 | ||||
-rw-r--r-- | src/service.rs | 1 |
4 files changed, 38 insertions, 2 deletions
@@ -3,8 +3,13 @@ name = "hedge" | |||
3 | version = "0.1.0" | 3 | version = "0.1.0" |
4 | authors = ["Akshay <[email protected]>"] | 4 | authors = ["Akshay <[email protected]>"] |
5 | edition = "2018" | 5 | edition = "2018" |
6 | 6 | description = "minimal url shortner" | |
7 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | 7 | homepage = "https://github.com/nerdypepper/hedge" |
8 | repository = "https://github.com/nerdypepper/hedge" | ||
9 | readme = "./readme.md" | ||
10 | keywords = [ "url", "server", "url shortner" ] | ||
11 | categories = [ "asynchronous", "compression" ] | ||
12 | license = "MIT" | ||
8 | 13 | ||
9 | [dependencies] | 14 | [dependencies] |
10 | hyper = "0.13" | 15 | hyper = "0.13" |
@@ -0,0 +1,20 @@ | |||
1 | Copyright 2018 Akshay Oppiliappan ([email protected]) | ||
2 | |||
3 | Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
4 | this software and associated documentation files (the "Software"), to deal in | ||
5 | the Software without restriction, including without limitation the rights to | ||
6 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
7 | of the Software, and to permit persons to whom the Software is furnished to do | ||
8 | so, subject to the following conditions: | ||
9 | |||
10 | The above copyright notice and this permission notice shall be included in all | ||
11 | copies or substantial portions of the Software. | ||
12 | |||
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
19 | SOFTWARE. | ||
20 | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | > minimal url shortner | 3 | > minimal url shortner |
4 | 4 | ||
5 | hosted instance: [isosta.tk](https://isosta.tk). | ||
6 | |||
5 | ### build | 7 | ### build |
6 | 8 | ||
7 | ``` | 9 | ``` |
@@ -24,3 +26,11 @@ Options | |||
24 | --port Port to start the server on (default: 3000) | 26 | --port Port to start the server on (default: 3000) |
25 | --database Path to database (default: urls.db_3) | 27 | --database Path to database (default: urls.db_3) |
26 | ``` | 28 | ``` |
29 | |||
30 | ### logging | ||
31 | |||
32 | start with | ||
33 | |||
34 | ```shell | ||
35 | $ RUST_LOG=hedge=trace hedge | ||
36 | ``` | ||
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. | |||
26 | github.com/nerdypepper/hedge | 26 | github.com/nerdypepper/hedge |
27 | 27 | ||
28 | To shorten urls: | 28 | To shorten urls: |
29 | |||
29 | curl -F'shorten=https://shorten.some/long/url' {}\n", | 30 | curl -F'shorten=https://shorten.some/long/url' {}\n", |
30 | String::from_utf8_lossy(host) | 31 | String::from_utf8_lossy(host) |
31 | ); | 32 | ); |