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)
- api.key - api key for yandex translator api
- 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