aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2020-08-24 14:13:06 +0100
committerAkshay <[email protected]>2020-08-24 14:13:06 +0100
commit1769baea084b9e414bfd8e24e942d119d8653348 (patch)
tree94274d2ab13ed093d8eb72df1d26196ede29a19c
parent4f83c8c353d25a1e2bf5c4859428bb2c3f1c04bb (diff)
add crate meta
-rw-r--r--Cargo.toml9
-rw-r--r--LICENSE20
-rw-r--r--readme.md10
-rw-r--r--src/service.rs1
4 files changed, 38 insertions, 2 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 0ab5f8f..1f5ecf4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,8 +3,13 @@ name = "hedge"
3version = "0.1.0" 3version = "0.1.0"
4authors = ["Akshay <[email protected]>"] 4authors = ["Akshay <[email protected]>"]
5edition = "2018" 5edition = "2018"
6 6description = "minimal url shortner"
7# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7homepage = "https://github.com/nerdypepper/hedge"
8repository = "https://github.com/nerdypepper/hedge"
9readme = "./readme.md"
10keywords = [ "url", "server", "url shortner" ]
11categories = [ "asynchronous", "compression" ]
12license = "MIT"
8 13
9[dependencies] 14[dependencies]
10hyper = "0.13" 15hyper = "0.13"
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..b7f6959
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,20 @@
1Copyright 2018 Akshay Oppiliappan ([email protected])
2
3Permission is hereby granted, free of charge, to any person obtaining a copy of
4this software and associated documentation files (the "Software"), to deal in
5the Software without restriction, including without limitation the rights to
6use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
7of the Software, and to permit persons to whom the Software is furnished to do
8so, subject to the following conditions:
9
10The above copyright notice and this permission notice shall be included in all
11copies or substantial portions of the Software.
12
13THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19SOFTWARE.
20
diff --git a/readme.md b/readme.md
index 48a59ff..a6693e6 100644
--- a/readme.md
+++ b/readme.md
@@ -2,6 +2,8 @@
2 2
3> minimal url shortner 3> minimal url shortner
4 4
5hosted 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
32start 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
28To shorten urls: 28To 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 );