Skip to content
/ demo Public
generated from mixerapi/app

MixerAPI demo project based on the mixerapi/app template.

License

Notifications You must be signed in to change notification settings

mixerapi/demo

Repository files navigation

MixerAPI Demo

Build Image MixerApi CakePHP Docker PHP NGINX MySQL

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:

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.

For Mac Users

  1. Change your SHELL in the Makefile to /bin/zsh. This improves various output from the Makefile such as emoji's.

  2. Mac ships with an older version of sed so install gnu-sed for some targets in the Makefile:

brew install gnu-sed

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:

bin/cake server

Browse to the URL given by the server console command.

Examples