An open API service indexing awesome lists of open source software.

https://github.com/dfirebaugh/url_shortener


https://github.com/dfirebaugh/url_shortener

Last synced: 8 months ago
JSON representation

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.