Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 868 Bytes

README.md

File metadata and controls

49 lines (36 loc) · 868 Bytes

DOCKER COMPOSE - Mongo, Mongo-Express, AutoAPI

Run MongoDB with Admin UI using mongo express and REST API using auto API

  1. Install docker / compose
  2. Run
docker-compose up
  • For auth image, the user need to login

Authentication

Each API has their own users, so users have to logged specifying the API in the request:

POST /login
Content-Type: application/json

{
  "api": "example",
  "email": "[email protected]",
  "password": "pass"
}

The response will contain a session token in the headers and body:

X-Email: [email protected]
X-Token: 123456

{
  "email": "[email protected]",
  "token": "123456"
}

To logout, users have to specify the API too:

POST /logout
Content-Type: application/json
X-Email: [email protected]
X-Token: 123456

{"api": "example"}