https://github.com/thedevs-network/url-shortener
TheDevs' URL Shortener
https://github.com/thedevs-network/url-shortener
Last synced: 8 months ago
JSON representation
TheDevs' URL Shortener
- Host: GitHub
- URL: https://github.com/thedevs-network/url-shortener
- Owner: thedevs-network
- Created: 2017-07-26T17:00:03.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-12T08:28:13.000Z (over 7 years ago)
- Last Synced: 2023-05-05T16:50:13.691Z (over 2 years ago)
- Language: JavaScript
- Size: 106 KB
- Stars: 17
- Watchers: 9
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
URL Shortener
=============
Hello there!
This is TheDevs' simple URL shortener!
Information
------------
POST to this URL with a URL of your choice as a request body to create a shortened link.
The server will respond with the ID.
Navigating to https://devs.sh/ID with the given ID will redirect you to the link provided.
Code examples
-------------
### cURL
curl -d "https://example.com/" https://devs.sh/
D
### Clientside JavaScript
fetch('https://devs.sh/', {
body: 'https://example.com/',
method: 'POST'
})
.then(res =>
res.text())
.then(id =>
console.log(id));
### Node.js
axios.post('https://devs.sh/',
"https://example.com/")
.then(id =>
console.log(id));
Shortening "https://example.com/" your link will be: https://devs.sh/D