Coder Social home page Coder Social logo

ultimate-movie-api's Introduction

License

Movie API

A lumen RESTful API which provides methods for storing, categorising and retrieving Movie information.

Docker build

The docker container can be started by running following from project root:

./run.sh

The docker container listens on http://localhost:8000

Contributing

OS dependencies

Following requirements for developing on Debian Jessie 8.9:

  • php7.1
  • php7.1-xdebug
  • php7.1-xml
  • php7.1-mbstring
  • php7.1-mysql (if using MySQL database)
  • curl
  • composer

Setting up environment

Copy .env.example and set environment variables as per development environment:

cp .env.example .env

Don't forget to create a database with the database name specified in .env

To setup development environment run:

composer install
php artisan doctrine:migrations:migrate
php artisan doctrine:generate:proxies

Seeding database

Database can be seeded by running:

php artisan db:seed --class=Uma\\Database\\Seeds\\DatabaseSeeder

The seeded user is:

username: apitest
password: password123

Generating documentation

Documentation can be generated using the swagger-php plugin:

./vendor/bin/swagger -o docs/ src/

The output swagger.json file can be found in docs/.

Running tests

Running unit + component + integration tests can be done from project root with:

./vendor/bin/phpunit

API tests can be found in (to see examples of testing lumen controllers):

tests/Infrastructure/Http/Controllers/

Note: index tests will fail if database has been seeded - database needs to be emptied before running tests

ultimate-movie-api's People

Contributors

tezhm 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.