Giter VIP home page Giter VIP logo

location-crud's Introduction

Locations Management API

This is a simple API built to manage locations using Laravel.

Requirements

  • Docker
  • Docker Compose

Installation and Setup

  1. Clone this repository:

    git clone https://github.com/ArturRA/location-crud
  2. Navigate to the project directory:

    cd location-crud
  3. Start the Docker containers:

    docker-compose up -d
  4. Wait for the laravelapp container to finish running composer install(you can monitor the progress in the container logs):

    docker-compose logs -f laravelapp
  5. Run database migrations to create the locations table:

    docker exec -it laravelapp sh -c "php artisan migrate"

Usage

Automated Tests

To check and ensure everything is set up correctly you can run the provided automated tests(that are inside the Locationtest.php file) with the following command:

docker exec -it laravelapp sh -c "php artisan test"

Postman Collection

To facilitate testing you can import the provided Backend challenge location crud api.postman_collection.json file into Postman to access all API endpoints and examples on how to use them.

API Endpoints

  • POST /api/locations: Create a new location.
  • GET /api/locations/{id}: Retrieve a specific location by its ID.
  • GET /api/locations: List all locations or filter them by name.
  • PUT /api/locations/{id}: Update a location.

location-crud's People

Contributors

arturra avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.