A demo HTTP API that translates text from a source language to a target language.
To build a docker image for the application, run the below command:
./build.sh
This will compile the application and build a Docker image.
Once the image has been built, it can be ran locally usinf Docker Compose with the below command:
docker-compose up
Clients can consume the API by issuing a HTTP request to the translate
endpoint as below:
curl --location --request POST 'http://localhost:8080/translate' \
--header 'Content-Type: application/json' \
--data-raw '{
"sourceLangCode": "en",
"targetLangCode": "de",
"text": "Hello World!"
}'