https://github.com/dfirebaugh/url_shortener
https://github.com/dfirebaugh/url_shortener
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dfirebaugh/url_shortener
- Owner: dfirebaugh
- Created: 2016-12-22T15:39:30.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-11-28T03:11:20.000Z (over 8 years ago)
- Last Synced: 2024-12-27T19:29:55.218Z (over 1 year ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
### This is a URL shortening api.
Create a file named .env in the root directory and save the mongodb URI in a variable called URI
e.g. `URI=mongodb://:@ds8888.mlab.com:21896/url-shortener`
`https://dfire-url-shortener.glitch.me/` will create a new shorter url
e.g. `https://dfire-url-shortener.glitch.me/new/2`
Which you can use to redirect to the orirginal url.
### Example Usage
`https://dfire-url-shortener.glitch.me/www.google.com`
will create:
`https://dfire-url-shortener.glitch.me/new/1`
which will redirect to:
`https://google.com`
If a URL already exists in the database, it will return an error stating that the URL already exists and show you the stored value.