This project is a REST API built with Apitte, Docker, PHP 8.1, and Nette 3.1.
/api/v1/pointsOfSale/find
: GET - Find byisOpen
orDateTime
(query string)
Important: If folder named 'log' does not exist, please create new.
-
Clone the repository
-
Navigate into the cloned directory and start the project with Docker:
docker compose up -d
-
Install the NPM dependencies:
npm install
&&npm run dev
ornpm run build
-
Build the composer dependencies by running:
docker compose exec php composer install
-
Build the database by running the migrations with this command:
docker compose exec php composer run run-migration
-
Synchronize data from PID
Call 'http://localhost:8080/?do=updatePointsOfSale' to syncronize all data or on 'http://localhost:8080/' click to 'Synchronize Points of sale'
After setting up, the following services can be accessed as shown:
- Swagger UI:
http://localhost:9001
- PHPMyAdmin (for database management):
http://localhost:8181
- OpenAPI json:
http://localhost:8080/api/v1/openapi
To handle CORS, the CorsMiddleware
middleware will be used to add appropriate CORS headers to the response.