From a555130456d4b5dcf3463866ee4898a542b3a009 Mon Sep 17 00:00:00 2001 From: Tom Andrade Date: Mon, 18 Mar 2019 22:51:09 +0100 Subject: [PATCH] Update README --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0bd43ee..038d2fd 100644 --- a/README.md +++ b/README.md @@ -9,14 +9,28 @@ Short is a very simple url shortener build in golang using web.go module and red Syntax is: ```shell -Usage of /short: +Usage of short: -addr string Address to listen for connections (default "localhost:8080") -domain string Domain to write to the URLs (default "localhost") + -path string + Path to the base URL (https://localhost/PATH/... remember to append a / at the end + -proto string + proto to the base URL (HTTPS://localhost/path/... no real https here just to set the url (for like a proxy offloading https (default "https") -redis string ip/hostname of the redis server to connect (default "localhost:6379") - -v prints current roxy version + -v prints current version + ``` -Includes a Dockerfile to for a standalone docker image \ No newline at end of file +Includes a Dockerfile to for a standalone docker image. + +To shorten a URL just post on /, you will get a reply with the shortened URL + +```shell +curl -X POST -d "url=http://google.com" http://localhost:8080/ +URL shortened at: https://localhost:8080/9mbIcOwsVP +``` + +Try it at https://thebarrens.nu/short/ \ No newline at end of file