Learning by doing. An attempt to create a RESTful API using Silex.
Must have PHP machine setup for development PHP 5.3.x. A DocumentRoot
pointed to silex-api-boilerplate/web
.
To get the source. Clone this repository locally or download.
# clone and name application
git clone git@github.com:nesbert/silex-api-boilerplate.git
cd silex-api-boilerplate
All commands relative silex-api-boilerplate
directory.
composer.sh install
rm -rf app/cache/*
rm -rf app/logs/*
APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1`
sudo chmod +a "$APACHEUSER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "`whoami` allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
../vendor/bin/phpunit
http://localhost
being a local domain.
http://localhost/
http://localhost/test/users
http://localhost/test/users/1
- Silex
- silex-tutorial <- really helped
Pull Requests always welcome, as well as any feedback or issues.