Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/contributte/api-router-skeleton
🎁 API router project skeleton based on Nette Framework (@nette) and Contributte (@contributte) libraries by @f3l1x & @paveljanda.
https://github.com/contributte/api-router-skeleton
api contributte nette-framework router
Last synced: 6 days ago
JSON representation
🎁 API router project skeleton based on Nette Framework (@nette) and Contributte (@contributte) libraries by @f3l1x & @paveljanda.
- Host: GitHub
- URL: https://github.com/contributte/api-router-skeleton
- Owner: contributte
- License: mit
- Created: 2017-07-03T08:12:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-10-21T09:28:05.000Z (23 days ago)
- Last Synced: 2024-10-31T15:47:27.614Z (13 days ago)
- Topics: api, contributte, nette-framework, router
- Language: PHP
- Homepage: https://examples.contributte.org/api-router-skeleton/
- Size: 428 KB
- Stars: 6
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![](https://heatbadger.now.sh/github/readme/contributte/api-router-skeleton/)
Website 🚀 contributte.org | Contact 👨🏻💻 f3l1x.io | Twitter 🐦 @contributte
-----
## Goal
Main goal is to provide skeleton for [contributte/api-router](https://github.com/contributte/api-router) library.
Focused on:
- latest PHP 8
- `nette/*` packages## Demo
https://examples.contributte.org/api-router-skeleton/
## Installation
To install latest version of `contributte/api-router-skeleton` use [Composer](https://getcomposer.org).
```
composer create-project -s dev contributte/api-router-skeleton acme
```Start PHP development server via `make dev`.
And take a look at:
- [GET] http://localhost:8000/api/ping
- [POST] http://localhost:8000/api/login## Get Started
- Using `contributte/api-router` for routing
- Implementing `IPresenter` in endpoints (`App\Controllers\LoginController`) instead of extending `UI\Presenter`
- Extending `ApiResponse` from Nette `JsonResponse`, just to make it more simple to add more custom headers and so on
- `LoginController` and `ErrorController` is using `ApiResponseFormatter` for formatting succes message, payload data or and exception## Development
See [how to contribute](https://contributte.org/contributing.html) to this package.
This package is currently maintained by these authors.
-----
Consider to [support](https://contributte.org/partners.html) **contributte** development team.
Also thank you for using this package.