https://github.com/cakephp/api-app
An API focused application skeleton
https://github.com/cakephp/api-app
Last synced: 7 months ago
JSON representation
An API focused application skeleton
- Host: GitHub
- URL: https://github.com/cakephp/api-app
- Owner: cakephp
- Created: 2024-07-31T04:16:59.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-31T04:19:21.000Z (over 1 year ago)
- Last Synced: 2024-07-31T06:20:42.372Z (over 1 year ago)
- Language: PHP
- Size: 367 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CakePHP API Application Skeleton

[](https://packagist.org/packages/cakephp/app)
[](https://github.com/phpstan/phpstan)
:warning: This repository is not ready for consumption :warning:
A skeleton for creating API focused applications with [CakePHP](https://cakephp.org) 5.x.
This application comes with the following customizations:
- JSON output is enabled. HTML rendering is discouraged.
- HTML focused middleware is not included. Sessions, CSRF, and secure cookies are not
included.
- Simpler Route configuration
The framework source code can be found here: [cakephp/cakephp](https://github.com/cakephp/cakephp).
## Installation
1. Download [Composer](https://getcomposer.org/doc/00-intro.md) or update `composer self-update`.
2. Run `php composer.phar create-project --prefer-dist cakephp/api-app [app_name]`.
If Composer is installed globally, run
```bash
composer create-project --prefer-dist cakephp/api-app
```
In case you want to use a custom app dir name (e.g. `/myapp/`):
```bash
composer create-project --prefer-dist cakephp/api-app myapp
```
You can now either use your machine's webserver to view the default home page, or start
up the built-in webserver with:
```bash
bin/cake server -p 8765
```
Then visit `http://localhost:8765` to see the welcome page.
## Update
Since this skeleton is a starting point for your application and various files
would have been modified as per your needs, there isn't a way to provide
automated upgrades, so you have to do any updates manually.
## Configuration
Read and edit the environment specific `config/app_local.php` and set up the
`'Datasources'` and any other configuration relevant for your application.
Other environment agnostic settings can be changed in `config/app.php`.