Skip to content

Latest commit

 

History

History
44 lines (35 loc) · 991 Bytes

readme.md

File metadata and controls

44 lines (35 loc) · 991 Bytes

Simple user web service

A simple user web service build on Laravel Lumen.

This web service is part of the koutsoumposval/laravel-microservices demo project

Setup

Install vendor dependencies with Composer

Navigate to service's root directory:

cd user/

To install all composer dependencies, run the following command:

docker run --rm -v $(PWD):/app -v $($HOME)/.composer:/composer --user $(id -u):$(id -g) composer install --optimize-autoloader --no-interaction --no-progress --no-scripts

Data

It holds 3 users hardcoded in the UserController:

    [
        "1" => "User 1",
        "2" => "User 2",
        "3" => "User 3",
    ]

Endpoints

There are 2 endpoints which are returning JSON Responses.

   # Returns all users
   GET http://user.lm.local/user 
   
   # Returns spesific user by id
   # or returns 404 'User not found'
   # if user does not exist
   GET http://user.lm.local/user/{id}