Skip to content

MadTiago/mShorty

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mShorty - Url shortener

Configuration

Create a .env file with the following configurations:

Setting Example
PORT 1337
MONGODB_URI mongodb://[USER:PASS]@localhost[:27017]/DATABASE

Endpoints

Endpoint Method Description
/:alias GET Get short url by alias and redirect
/url POST Create short url

The content-type accepted is application/json for all endpoints.

  • /:id
    :id = alias for the short url

  • /url
    Request JSON body
{
  "url": "http://google.com"
  "alias": "google"
}

url is required
alias is optional (In case this field is empty, a random alias will be generated for the url)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published