Little Big URL Shortener Instalation
#Little Big URL Shortener Instalation#
/etc/hosts
and your httpd.conf
Mine looks like:<VirtualHost *:80>
DocumentRoot "/home/leandro/public_html/leash"
ServerName leash.dev
<Directory "/home/leandro/public_html/leash">
Options Includes FollowSymLinks
AllowOverride All
Allow from all
</Directory>
</VirtualHost>
create a database, enter the mysql
console and import the database schema, with a command like (file path is an example):
source ~/public_html/leash/bd/bd.sql
now you can configure the app options in app/config.yml
(auth & cache options don't work yet)
ok, the app should work right now. you can test the rest API accessing the following endpoints:
You can test the GET rest API endpoints with these raw URLs pointing to them directly
You can find an HTML interface at http://yourdomain.dev/html
There, introduce a canonical URL and via ajax will be shown the shortened URL.
A statistics
link for that shortened URL appears also next the shortened URL.
You only can see the stats of a link once that link has been visited one time at least.
vendor/bin/phpunit Tests/ControllerTest.php --verbose
(please, edit the Test class and provide existent data in your database for your own tests)