Example native Nette API project using contributte/api.
- PHP 8.4 or newer
- Composer
Create the distributed project, copy its local configuration, and prepare writable runtime directories:
composer create-project contributte/api-skeleton acme
cd acme
cp config/local.neon.example config/local.neon
mkdir -p var/tmp var/log
chmod 0777 var/tmp var/logThe package distribution excludes the repository Makefile, so setup uses the direct commands above. Composer already installs dependencies during project creation.
NETTE_DEBUG=1 NETTE_ENV=dev php -S 0.0.0.0:8000 -t www www/index.phpPassing www/index.php as the router lets the PHP development server handle API paths; the repository make dev target omits it. The server listens on http://localhost:8000. In another terminal, verify it:
curl http://localhost:8000/api/_/ping
# pongOpen http://localhost:8000/api/_/apidoc to discover the available API routes and their request and response schemas.
Repository contributors can use these Make targets; they are not included in projects installed from the package distribution:
make qa # coding standard and static analysis
make tests # Nette Tester suite
make cs # coding standard check
make csf # fix coding standard issues
make phpstan # static analysis
make coverage # generate coverage output