Skip to content

Latest commit

 

History

History
71 lines (61 loc) · 1.67 KB

README.md

File metadata and controls

71 lines (61 loc) · 1.67 KB

About

GreetMe Server is a trivial service that provides personalized greeting messages in different languages to clients. (A corresponding client is the web frontend GreetMe Web.)

It is merely a simple demo application that was used for winning insights of the build, deployment, and management possibilities provided by PaaS solutions.

Example requests

Create a "Hello, Bob!" greeting for a person named Bob in English

Request:

curl -X POST -H 'Content-Type: application/json' -d '{"name": "Bob", "nativeLanguageCode": "en"}' localhost:8080/greetings

Response:

{
  "id": 1,
  "message": "Hello, Bob!"
}

Get all greeting messages that have been created

Request:

curl localhost:8080/greetings

Response, assuming a french greeting for Alice has been created additionally to that for Bob:

[
  {
    "id": 1,
    "message": "Hello, Bob!"
  },
  {
    "id": 2,
    "message": "Bonjour, Alice!"
  }
]

Get a single, already created greeting message

Request:

curl localhost:8080/greetings/2

Response:

{
  "id": 2,
  "message": "Bonjour, Alice!"
}

Run it as backend for GreetMe Web

Change the port settings from 8080/8081 to 9090/9091 by setting the system property -Dspring.profiles.active=prod.

Characteristics

GreetMe Server contains:

  • different types of automated tests: unit, component, integration, and consumer-driven contract tests
  • externalized configuration
  • a connection to an external service for all non-English translations of "hello"
  • password secured metrics (e.g. for monitoring)
  • logging
  • error handling

Missing characteristics

GreetMe Server does not contain:

  • persistent state / attachment of storage