saulmoralespa / api-flying-taxi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy with Docker

Step 1: create file .env

Create file .env or copy .env.example to .env

mv .env.example .env

Step 2: Run containers Docker

docker-compose build
docker-compose up

Step 3: Use REST API

Request new Ride

curl --location 'http://localhost:4000/api/v1/request-ride' \
--header 'Content-Type: application/json' \
--data-raw '{
    "coordinates":[
        15.35567,
        30.98765
    ],
    "name": "Andres",
    "email": "andresperez@gmail.com",
    "phone": "3145671247"
}'

Finish Ride

curl --location 'http://localhost:4000/api/v1/finish-ride/7' \
--header 'Content-Type: application/json' \
--data '{
    "end_location":[
        15.364728509,
        30.98765
    ]
}'

About


Languages

Language:Ruby 97.0%Language:Dockerfile 1.9%Language:Shell 1.1%