strogiyotec / translator

Rest api to translate text

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

translator

Rest api to translate text

This is the test project that uses Yandex API in order to translate text

In order to run use the following command

mvn spring-boot:run

If you want to contribute please check that your code doesn't have any checkstyle errors

mvn:checkstyle:checkstyle

Also check that all tests work

mvn test

Configurable properties: in order to configure project you can use application.properties file (src/resources)

  1. api.key - api key for yandex translator api
  2. port - server port

This project uses H2 db. In order to do database migrations Flyway is used

How to use?

Example:

 curl -X GET 'http://localhost:8080/translate?languageTo=ru&languageFrom=en&text=hello'

To create docker image run following

  ./build.sh

This command will create image named translator using Dockerfile from this repository.

To start container run this

  docker run -it --name translator_v1 -p 8080:8080 translator

About

Rest api to translate text

License:Apache License 2.0


Languages

Language:Java 99.0%Language:Dockerfile 0.8%Language:Shell 0.2%