A mixerapi/mixerapi demo application. This project was generated from the mixerapi/app template. See that project for additional details.
Checkout the live demo: https://demo.mixerapi.com
Installation
You can run this demo via Docker and/or a local LAMP stack. Fork/clone this repository to get started.
Docker
Bring up stack:
Next, generate schema and seed data:
make php.sh bin/cake migrations migrate bin/cake migrations seed
That's it! Now browse to http://localhost:8080.
For Mac Users
-
Change your
SHELLin the Makefile to/bin/zsh. This improves various output from the Makefile such as emoji's. -
Mac ships with an older version of
sedso installgnu-sedfor some targets in the Makefile:
Then update sed to gsed in the Makefile.
Local
Copy default configs:
cd app cp config/.env.example config/.env cp config/app_local.example.php config/app_local.php cp ../.assets/bootstrap.php config/bootstrap.php
Configure your database settings in app/config/.env and run:
composer install bin/cake migrations migrate bin/cake migrations seed
Generate keys for authentication examples:
mkdir -p plugins/AuthenticationApi/config/keys/1 openssl genrsa -out plugins/AuthenticationApi/config/keys/1/private.pem 2048 openssl rsa -in plugins/AuthenticationApi/config/keys/1/private.pem -outform PEM -pubout -out plugins/AuthenticationApi/config/keys/1/public.pem openssl rand -base64 24 > plugins/AuthenticationApi/config/keys/hmac_secret.txt
Bring on local server:
Browse to the URL given by the server console command.
Examples
- For Docker see this README.
- For information on the demo application code see app/README.md
- For JWT Authentication see AuthenticationApi. The
AuthenticationApi uses MixerApi/JwtAuth. See
plugin/AdminApi/src/Application.phpfor loading CakePHP authenticators and identifiers.