https://github.com/tomoat/fcc-short-url
🍎 URL Shortener Microservice
https://github.com/tomoat/fcc-short-url
Last synced: over 1 year ago
JSON representation
🍎 URL Shortener Microservice
- Host: GitHub
- URL: https://github.com/tomoat/fcc-short-url
- Owner: tomoat
- Created: 2017-05-11T14:51:14.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T18:09:32.000Z (about 4 years ago)
- Last Synced: 2025-01-13T19:39:29.115Z (over 1 year ago)
- Language: JavaScript
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# URL Shortener Microservice
## 用户故事:
- 用户在浏览器输入该地址时,把一个合法的 URL 作为参数,返回一个 JSON 格式的段地址。
- 如果用户输入的是一个无效的 URL 地址(不符合 http://www.example.com 格式)作为参数,则返回错误。
- 如果用户输入前边生成的段地址,则会重定向到相应的合法地址。
## Example creation usage:
https://fccp-short-url.herokuapp.com/new/https://www.google.com
https://fccp-short-url.herokuapp.com/new/http://foo.com:80
## Example creation output:
{"original_url":"http://foo.com:80","short_url":"https://fccp-short-url.herokuapp.com/8170"}