Nincs leírás

elias 5ca651e606 initial 2 éve
app 5ca651e606 initial 2 éve
bootstrap 5ca651e606 initial 2 éve
config 5ca651e606 initial 2 éve
database 5ca651e606 initial 2 éve
public 5ca651e606 initial 2 éve
resources 5ca651e606 initial 2 éve
routes 5ca651e606 initial 2 éve
storage 5ca651e606 initial 2 éve
tests 5ca651e606 initial 2 éve
.editorconfig 5ca651e606 initial 2 éve
.env.example 5ca651e606 initial 2 éve
.gitattributes 5ca651e606 initial 2 éve
.gitignore 5ca651e606 initial 2 éve
README.md 5ca651e606 initial 2 éve
artisan 5ca651e606 initial 2 éve
composer.json 5ca651e606 initial 2 éve
composer.lock 5ca651e606 initial 2 éve
package.json 5ca651e606 initial 2 éve
phpunit.xml 5ca651e606 initial 2 éve
vite.config.js 5ca651e606 initial 2 éve

README.md

Airport Search API

Description

Airports search API is a RESTful web service for searching airports data.

Requirements

  • PHP ^8.1
  • Composer
  • Elasticsearch ^8.8

API Endpoints

Search Endpoint

URL: /api/search
Method: GET
URL Params:
query=[string] - The query string to search for.
Success Response:
    Code: 200
    Content: JSON array of matching airports

Installation Steps

  1. Install the Composer dependencies:

    composer install
    
  2. Setup the Environment File:

    cp .env.example .env
    
  3. Configure Elasticsearch comma-separated hosts in .env file

    ELASTICSEARCH_HOSTS=localhost:9200,localhost:9201
    
  4. Generate the application key:

    php artisan key:generate
    
  5. Create the Elasticsearch Index:

    php artisan update-airports-index
    
  6. Start the Laravel server:

    php artisan serve
    

Running the Tests

php artisan test