GithubHelp home page GithubHelp logo

test-php-heatmap-laminas's Introduction

Simple Heatmap API Application

Based on Laminas API Tools skeleton application.

API documentation is exposed via the /api-tools/documentation.

Requirements

Please see the composer.json file.

Installation

Via Git (clone)

First, clone the repository:

# git clone https://github.com/mihsar/test-php-heatmap-laminas.git # optionally, specify the directory in which to clone
$ cd path/to/install

At this point, you need to use Composer to install dependencies. Assuming you already have Composer:

$ composer install

Setting development mode

Once you have the basic installation, you need to put it in development mode:

$ cd path/to/install
$ composer development-enable

Next you can use the built-in web server in PHP (only for development) as described here

Vagrant

Check the original info here

Docker

If you develop or deploy using Docker, we provide configuration for you.

Prepare your development environment using docker compose:

$ git clone https://github.com/mihsar/test-php-heatmap-laminas
$ cd test-php-heatmap-laminas
$ docker-compose build
# Install dependencies via composer, if you haven't already:
$ docker-compose run apigility composer install
# Copy separate local db connection details: username and password
$ docker-compose run apigility cp ./config/autoload/db.local.php.dist ./config/autoload/db.local.php
# Enable development mode:
$ docker-compose run apigility composer development-enable

Start the container:

$ docker-compose up

Access application from http://localhost:8080/ or http://<boot2docker ip>:8080/ if on Windows or Mac.

You may also use the provided Dockerfile directly if desired. And set up db connection details in db.global.php and set username and password in db.local.php.

Or to manipulate development mode:

$ docker-compose run apigility composer development-enable
$ docker-compose run apigility composer development-disable
$ docker-compose run apigility composer development-status

A database service is provided inside docker-compose config, and it should import sql files provided with repo in ./data/mysql-dump/. Port 33060 is mapped to access from host as localhost:33060 using username/password details provided in docker-composer config.

QA Tools

The app ships with a few basic tests for the endpoints exposed in documentation.

# Run PHPUnit tests:
$ composer test     
# You can execute in container as well (make sure `docker-compose up` has run, it needs db connection): 
$ docker-compose exec apigility composer test 

test-php-heatmap-laminas's People

Contributors

mihsar avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.