Badge JSON API which is build on top of Silex framework.
- Main points
- Requirements
- Development
- Installation
- Nice to know things
- Docker
- Contributing
- Author
- LICENSE
- Configuration for each environment and/or developer
- Authentication via JWT
- "Automatic" API doc generation
- Database connection (Doctrine dbal + orm)
- Console tools (dbal, migrations, orm)
- Basic API for badges
- Basic API for badge groups
- Basic API for images
- And all the rest...
- PHP 5.5.x
- Apache / nginx / IIS / Lighttpd see configuration information here
- Use your favorite IDE and get checkout from git
- Open terminal, go to folder where you make that checkout and run following commands
$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install
- Open terminal and clone this repository to your server
- Create web-server configuration which points to
web
folder
Add your local.yml
configuration file to some (or all) following directories:
resources/config/common
resources/config/dev
resources/config/prod
Within this file you can override any environment or common configuration value as you like. Basically first thing to do is define your database settings - without these you can't basically do anything...
This can be done with following command:
./bin/console migrations:migrate
- Missing
var
directory? Create it and check that it has proper write access in other words just dochmod 777 var
GET http://yoururl/_dump
- generates pimple.json for autocomplete
- See this for more info
./bin/console orm:convert:mapping --from-database --namespace="App\\Entities\\" annotation ./src
- Generate Doctrine entities from database
This project has also Docker container that you can use. Actual Dockerfile uses php:5.5-cli as the base image.
You can easily build your own docker image with following command
docker build -t yourimage .
And after that run that docker image by following command
docker run -t -i yourimage
With this docker image you can set following ENV variables to specify your database connection:
DATABASE_DB_OPTIONS_DRIVER
DATABASE_DB_OPTIONS_HOST
DATABASE_DB_OPTIONS_DBNAME
DATABASE_DB_OPTIONS_USER
DATABASE_DB_OPTIONS_PASSWORD
DATABASE_DB_OPTIONS_CHARSET
Please see the CONTRIBUTING.md file for guidelines.
Copyright (c) 2016 Protacon Solutions