Linkto is a URL shortener. It shortens a long URL (such as https://np.reddit.com/r/IAmA/comments/2wwdep/we_are_edward_snowden_laura_poitras_and_glenn/courx1i?context=3) to a shorter, more memorable URL like http://nindalf.com/OverconfidentArowana, making it much easier to share.
####Advantages
- Simple REST API to interact with. Creating links is as easy as
curl --data 'longurl=http://reddit.com/r/programming' nindalf.com/shorten
(Try it!) - Very configurable. Its possible to change the kind of links generated by changing the files in the words directory. You could use AdjectiveScientist instead of AdjectiveAnimal if that's your thing.
- Easy to deploy. Once you install Docker, deploying this app will take only 3 commands
####Deploying
Edit the .env
file with your hostname and the kind of URLs you'd like to generate.
- Install Docker and Docker Compose
git clone https://github.com/nindalf/linkto
- clone this repodocker-compose build
- create a Docker image out of this repodocker-compose up
- deploy linkto and redis containers and link them. Also expose linkto publicly.
####Contributing
Create pull requests or open an issue for any improvements, whether that's adding a feature in the server, improving the docker files or even adding your favourite scientist or animal to the word list. I would appreciate either :)
I'm working on these features next
- Statistics for each link
- Creation of user accounts
####Acknowledgements
I'd like to thank Gary Burd for his excellent redis client, Salvatore Sanfilippo for redis and the Go Authors for the excellent standard library.
I got the list of adjectives from momswhothink.com and the list of scientists from famousscientists.org, so thanks to them too.