Skip to content

Repository files navigation

Laravel Project Setup with Docker (Sail)

Install Dependencies

composer install

Copy the .env File

Duplicate the .env.example file and rename it to .env:

Start Laravel Sail

./vendor/bin/sail up -d

Run Migrations

./vendor/bin/sail artisan migrate --seed

In storage/logs/laravel.log file should be API TOKEN KEY. Use it to authenticate when sending requests to API

Start queue worker

./vendor/bin/sail artisan queue:work

Access the Application

http://localhost

API

Authentication

Add to header Bearer Token

"Authorization": "Bearer {YOUR_AUTH_KEY}"

POST /api/jobs

Body example

{
    "scrape": [
        {
            "url": "https://tandemum.lt/apie-mus",
            "selectors": {
                "wrapper": ".team__member",
                "map": {
                    "name": ".team__member-name",
                    "role": ".team__member-role"
                }

            }
        },
        {
            "url": "https://quotes.toscrape.com/tag/friendship/",
            "selectors": {
                "wrapper": ".quote",
                "map": {
                    "text": ".text",
                    "author": ".author"
                }

            }
        }

    ]
}

GET /api/jobs/{id}

DEL /api/jobs/{id}

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages