A starter project for a Slim API application.
composer create-project akrabat/slim-api-starter my-new-api
cd my-new-api
php -d html_errors=0 -S 0.0.0.0:8888 -t public/
Test using curl
:
- Heartbeat:
curl http://localhost:8888/heartbeat?state=abc
- Command:
curl -H "Authorization: token abc123" http://localhost:8888/ -d 'command=foo¶m[]=bar¶m[]=baz'
To cache the DIC automatic resolution, set the DI_COMPILATION_PATH
environment variable to a valid directory. If this
directory doesn't start with a /
, then it will be considered relative to the root directory.
e.g.
$ mkdir -p var/cache
$ DI_COMPILATION_PATH='var/cache' php -d html_errors=0 -S 0.0.0.0:8888 -t public/