Introducing Yooo: a URL Shortener API based on Enferno framework
This article will show you how to run your own URL Shortener API (similar to goo.gl) based on Enferno (Flask+Mongodb)
1.Download the deployment script
git clone git@github.com:level09/yooo-ansible.git && cd yooo-ansible
2.Update the configuration
Replace the IP address inside the “hosts” file with your instance/server IP address. you should also change the domain name and/or the application username by editing the “vars.yml” file
3. Run the script
ansible-playbook -i hosts enferno.yml
4. Test the service
You can test the service by executing the following CURL command:
curl http://<domain|IP>/v1/url -H ‘Content-Type: application/json’ -d ‘{“longUrl”: “http://www.google.com/"}'
Congratulations! you have just installed your own shortener service, powered by Flask and Mongodb.
** Note that this deployment script currently only works on Ubuntu 12.x and 14.x , if you would like to run it on a different distribution, feel free to clone the Source Code and deploy it anywhere.