sercankavdir / magiclab-case

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Magic Lab Case Study

Installation

To test the application, clone repository and add the firebase file which is attached to the email.

  1. Build docker:
docker build . -t magiclab
  1. Run docker:
docker run -p 8080:8080 -d magiclab

Postman Endpoints

NOTE

Save and read endpoints protected by authentication mechanism. Make sure to provide generated token at the headers section x-access-token area after login.

   POST /save
Parameter Type
id Number
gold Number
diamond Number
username String

Method: POST

Body:

{
  "id": 1,
  "gold": 123,
  "diamond": 15,
  "username": "magic"
}

Response

Status: 200

 {
   "Saved successfully!"
 }
   POST /read?id=1

Response

Status: 200

{
  "id": 1,
  "gold": 123,
  "diamond": 15,
  "username": "magic"
}

About


Languages

Language:JavaScript 95.8%Language:Dockerfile 4.2%