Skip to content

Latest commit

 

History

History
43 lines (32 loc) · 702 Bytes

README.md

File metadata and controls

43 lines (32 loc) · 702 Bytes

shorurl

短网址

演示地址:vvia.xyz

API

生成短网址

URL: http://vvia.xyz/s
Method: POST
Parmeters: url
Return: JSON

示例

$ curl -d '{"url":"https://github.com/irealing/shorturl"}' vvia.xyz/s
{"err_no":0,"msg":"success","data":"orv2oe"}

查询短网址真实URL

URL: http://vvia.xyz/s/\<string:shorted\>
Method: GET
Parmeters: url
Return: JSON

示例

$ curl -X GET vvia.xyz/s/orv2oe

{"err_no":0,"msg":"success","data":"https://github.com/irealing/shorturl"}

使用 Docker 镜像

docker run -d --name shorturl --restart=unless-stopped -p 80:80 -v $PWD:/data irealing/shorturl:0.1