Skip to content

aembleton/Play-URL-Shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Play URL Shortener

Provides a simple tag for shortening URLs inside a view. For example:

#{shorten.url 'http://www.example.com'/}

will render to:

http://is.gd/RGW31T

There is not currently any way of adding further parameters and only is.gd can be used.

Once a short URL is found for a long URL, this mapping is stored in the play cache (play.cache.Cache) with the key set to “url-shortener_” followed by the long URL and the value set to the short URL.

Installation

Module installation

Download this whole project into a directory called urlShortener and copy that to the modules directory inside your play framework. I’ll try and get this added to the modules repository soon to make this step easier.

Enable the module

After installing the module, add the following to your application.conf to enable it:

module.shortener=${play.path}/modules/urlShortener

About

URL Shortener module for the Play framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages