Readme update
This commit is contained in:
parent
70bf7b0406
commit
d0ab87e9e6
15
README.md
15
README.md
@ -32,7 +32,9 @@ To shorten a URL just post on /, you will get a reply with the shortened URL
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl -X POST -d "url=http://google.com" http://localhost:8080/
|
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
|
URLs missing a Scheme (http[s]://) will be defaulted to https
|
||||||
@ -57,27 +59,24 @@ $ curl http://localhost:8080/v1/dump
|
|||||||
|
|
||||||
Dump the mapped url to `-dump` file (defaults to ./urls.json)
|
Dump the mapped url to `-dump` file (defaults to ./urls.json)
|
||||||
|
|
||||||
```shel
|
```shell
|
||||||
$ curl http://localhost:8080/v1/dumpToFile
|
curl http://localhost:8080/v1/dumpToFile
|
||||||
Dump writen to: urls.json
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Load url mappings from `-dump` file to in memory db
|
Load url mappings from `-dump` file to in memory db
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ curl http://localhost:8080/v1/fromFile
|
curl http://localhost:8080/v1/fromFile
|
||||||
OK
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Load url mappings from POST data (Assuming json data on save.json file)
|
Load url mappings from POST data (Assuming json data on save.json file)
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
$ curl -X POST http://localhost:8080/v1/fromPost \
|
curl -X POST http://localhost:8080/v1/fromPost \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
--data $(cat save.json )
|
--data $(cat save.json )
|
||||||
OK
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## HTML templates
|
## 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)
|
A simple collection of html templates are put on `templates` folder, the templates I've used are based on [@jspark721]( https://github.com/jspark721 ) "UI 404 PAGE" on [freefrontend](https://codepen.io/juliepark/pen/erOoeZ)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user