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
You can run this demo via Docker and/or a local LAMP stack. Fork/clone this repository to get started.
Bring up stack:
make init
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.
-
Change your
SHELL
in the Makefile to/bin/zsh
. This improves various output from the Makefile such as emoji's. -
Mac ships with an older version of
sed
so installgnu-sed
for some targets in the Makefile:
brew install gnu-sed
Then update sed
to gsed
in the Makefile.
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:
bin/cake server
Browse to the URL given by the server
console command.
- 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.php
for loading CakePHP authenticators and identifiers.