apeyrard / case-microservice

Simple Flask microservice to test microservice architectures

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Case microservice

This flask webservice provides a REST api to uppercase or lowercase strings.

Installation

Build docker image:

docker build -t apeyrard/case .

Run image

docker run -e GUNICORN_WORKERS=4 -p 8000:8000 apeyrard/case

Usage

Lowercase

curl -X POST -H "Content-Type: application/json" -d '{"text":"Foo"}' 127.0.0.1:5001/api/v1/lower

Uppercase

curl -X POST -H "Content-Type: application/json" -d '{"text":"Foo"}' 127.0.0.1:5001/api/v1/upper

Reverse

curl -X POST -H "Content-Type: application/json" -d '{"text":"Foo"}' 127.0.0.1:5001/api/v2/reverse

About

Simple Flask microservice to test microservice architectures


Languages

Language:Python 79.6%Language:Shell 20.4%