Skip to content

vinixnan/phplumentest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fibonacci API

A REST API for Fibonacci written in PHP8.

Library Version
PHP 8.1
Lumen Framework 10.0
Swagger-lume 10.1

How to run?

Using dockerhub:

docker run -it -p 8001:8001 --name lumen vinixnan/phplumentest:main

Building:

docker build -t phplumentest .

docker run -it -p 8001:8001 --name lumen phplumentest

Docker-compose (good for development):

docker-compose up --build

Then take a look at the Swagger documentation:

http://localhost:8001/api/documentation

or run the following command, to calculate fibonacci for 50:

http://localhost:8001/fibofast?count=50


Some files to pay attention:

Folder Description
Fibonacci.php Has two Fibonacci implementation, the recursive and the iterative
FibonacciController.php Provides all structure for a GET method towards Fibonnaci functions
FiboTest.php Provides unit tests (PHPUnit) towards the API
Dockerfile Dockerfile to contenerize the application
Dockerfile compose Docker compose to help developers (already mapping dir)
GitHub Actions CI/CD to build the docker image and send it to Dockerhub

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published