DotKernel's PSR-15 API built around the Mezzio API skeleton.
Based on Enrico Zimuel's Zend Expressive API skeleton proposal.https://github.com/ezimuel/zend-expressive-api
$ composer install
During the installation process you will be prompted:
Please select which config file you wish to inject 'Laminas\*\ConfigProvider' into:
[0] Do not inject
[1] config/config.php
Make your selection (default is 1):
Please enter 0
because the application has an injected ConfigProvider which already contains the prompted configurations.
Next, you will be prompted: Remember this option for other packages of the same type? (Y/n)
Please hit Enter
to accept the default option, which will also leave other packages' ConfigProviders uninjected.
- duplicate
config/autoload/local.php.dist
asconfig/autoload/local.php
- duplicate
config/autoload/mail.local.php.dist
asconfig/autoload/mail.local.php
- create a new MySQL database - set collation to
utf8mb4_general_ci
- fill out the database connection params in
config/autoload/local.php
- run the database migrations by using the following command:
$ vendor/bin/doctrine-migrations migrate
- Enable development mode using this command:
$ composer development-enable
- Configure SMTP by adding setting your account params in
config/autoload/mail.local.php
underdot_mail -> default -> smtp_options
You can access the Mezzio's CLI by using the following command:
$ composer mezzio
You can access Doctrine's CLI by using the following command:
$ php vendor/doctrine/orm/bin/doctrine
You can access Doctrine's migration tools by using the following command:
$ vendor/bin/doctrine-migrations
$ php -S 0.0.0.0:8080 -t public
To test the application, visit the home page. You should get the following message:
{
"message": "Welcome to DotKernel API!"
}
Visit this link to access the application's documentation.
Here, you can request an access token using the /oauth2/generate
endpoint using the following credentials:
username: [email protected]
password: dotkernel
IMPORTANT: Don't forget to invalidate the above credentials on your application's production servers!