Bump version to 1.0.0

This commit is contained in:
Tom Andrade 2019-04-29 21:42:36 +02:00
parent 554af81c01
commit c3b26395e1
Signed by: wolvie
GPG Key ID: 31AAB07872E82669
3 changed files with 30 additions and 13 deletions

View File

@ -4,6 +4,17 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
## 2019-04-29 - 1.0.0
### Added
- Default to https for empty scheme URLs
- Refactoring variables names/usage
- Add html templates
- Improved URL validation
- Control flag for shortened URL size
- README typos
## 2019-04-28 - 0.2.0 ## 2019-04-28 - 0.2.0
### Added ### Added

View File

@ -16,14 +16,14 @@ Usage of short:
-dump string -dump string
Path to the file to dump the kv db (default "urls.json") Path to the file to dump the kv db (default "urls.json")
-path string -path string
Path to the base URL (https://localhost:8080/PATH/... remember to append a / at the end Path to the base URL (https://localhost/PATH/... remember to append a / at the end
-port string -port string
Port to listen for connections (default "8080") Port to listen for connections (default "8080")
-proto string -proto string
proto to the base URL (HTTPS://localhost:8080/path/... no real https here just to set the url (for like a proxy offloading https (default "https") 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")
-v -urlsize int
prints current version Define the size of the shortened String, default 10 (default 10)
-v prints current version
``` ```
Includes a Dockerfile to for a standalone docker image. Includes a Dockerfile to for a standalone docker image.
@ -35,9 +35,11 @@ curl -X POST -d "url=http://google.com" http://localhost:8080/
URL shortened at: https://localhost:8080/9mbIcOwsVP URL shortened at: https://localhost:8080/9mbIcOwsVP
``` ```
URLs missing a Scheme (http[s]://) will be defaulted to https
## Dump/Restore endpoints ## Dump/Restore endpoints
URL mapping data can be checked, listed, dumped and restored in the given endpoints: URLs for mapping data can be checked, listed, dumped and restored in the given endpoints (you might want (and you should) restrict access to this e.g. reverse proxy):
Show the number of mapped urls Show the number of mapped urls
@ -75,3 +77,7 @@ $ curl -X POST http://localhost:8080/v1/fromPost \
--data $(cat save.json ) --data $(cat save.json )
OK OK
``` ```
## HTML templates
A simple collection of html templates are put on `templates` folder, the templates I've used are based on @jspark721 "UI 404 PAGE" on [freefrontend](https://codepen.io/juliepark/pen/erOoeZ)

View File

@ -29,7 +29,7 @@ const (
letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits letterIdxMax = 63 / letterIdxBits // # of letter indices fitting in 63 bits
) )
const ( const (
appVersion = "0.2.0" appVersion = "1.0.0"
) )
var domain string var domain string