8000 GitHub - trantila/urlnode: An awesome URL shortener node(.js).
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

trantila/urlnode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URLNode

An awesome URL shortener running on node.js, running live on http://urlnode.herokuapp.com/.

About

URLNode is a very, very, barebones URL shortener. It lets you store an URL for "shorting" in non-persistent memory (lasts around an hour in Heroku).

There is also absolutely no way to choose the shortened URL. In other words, the created URL is always random and consist of [a-z0-9]. Collisions are handled brutally but shouldn't cause too much problems. Additionally, nothing is done to check the DB for existing links to certain URLs - not a big in small scale, but a proper hashing mechanism for storing the URLs would make this quite simple.

Finally, CORS is globally allowed.

API

POST /shorten
Parameters: link should contain the link to shorten.
Returns: Id for the shortened link in text/plain format.
Errors: 400 for missing parameters and 500 for failed ID generation.

GET /{id}
Returns: 301 redirects to a previously stored URL.
Errors: 404 error if no link is stored with given id.

About

An awesome URL shortener node(.js).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0