Download the PHP package vexelon.net/e-additives.server without Composer
On this page you can find all versions of the php package vexelon.net/e-additives.server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vexelon.net/e-additives.server
More information about vexelon.net/e-additives.server
Files in vexelon.net/e-additives.server
Package e-additives.server
Short Description E-additives RESTful web service
License AGPL-3.0
Homepage https://github.com/vexelon-dot-net/e-additives.server
Informations about the package e-additives.server
e-additives.server
The goal of the E-additives project is to implement a web platform that will provide detailed information about food additives.
This project is a RESTful web service implementation that provides CRUD access to the data which may later be consumed by web or mobile apps using a defined HTTP API.
Check the documentation.
Requirements
Required software components:
- Nginx 1.4.x
- PHP 5.3.x
- PostgreSQL 9.x
- Redis 2.2.x
Getting Started
Note that the following steps are to be executed on Linux systems. On Windows you would need to use different commands.
Install required PHP extensions and enable them in php.ini
:
- mcrypt.so
- openssl.so
- phar.so
- php_pdo_pgsql.so
- php_mbstring.so
Install composer:
curl -s https://getcomposer.org/installer | php
Install dependencies via composer:
php composer.phar install
Create database structure and Import data:
$ cd data
$ psql your-database < `pg_db_schema.sql`
$ psql your-database < `pg_db_app_data.sql`
Please have a look at the pg_db_schema.sql
and adjust the user rights and owner of the postgres database.
Configuration
Configure Nginx
Configuring Nginx can be tricky mainly because of how the Slim framework resolves
the request uri. The following configuration assumes a php5-fpm
type of setup.
Configure Application
Copy the config-empty.php
to config.php
and open the file in a text editor.
- Configure
DB_SETTINGS
by specifying database name and user with access privileges. - Configure
CACHE_SETTINGS
if you have a Redis server running. - Generate and set client API key in
X_AUTH_KEY
. - Configure
BASE_URL
by specifying the full path to the API. Just add what you specified inRewriteBase
to thehttp://%s/
string, .e.g, http://%s/ead.server.api. - Set
MAINTENANCE_MODE
tofalse
to enable API calls.
Testing
Test using CURL or some REST client tool.
Read the API docs to check what API calls are available and how to use them.
License
- E-additives server license - AGPL
- E-additives server data license - CC BY-SA 4.0
All versions of e-additives.server with dependencies
ext-phar Version *
ext-pdo_pgsql Version *
ext-mbstring Version *
slim/slim Version 2.3.*
doctrine/common Version 2.4.*@dev
doctrine/dbal Version 2.4.*@dev
predis/predis Version 0.8.*@dev