No local setup should be needed apart from:
Run in project directory:
docker-compose build
Run in project directory:
docker-compose up
This will build the container based on the Dockerfile and docker-compose file
and start the local server at http://localhost:8080
there are many ways to use the application:
1. Goto your browser at http://localhost:8080
type the text you want to be translated
into the input then click send and you'll get back a translated response below
- open a terminal go to the project directory and type E.g
python3 client.py 'Hello my name is Alice'
Or you use curl
E.g:
curl -i -H "Content-Type: application/json" -X POST -d '{"word": "James"}'http://localhost:8080/api/v1/translate
There's few simple tests
You can run the tests two ways
- in the project directory type
python3 tests.py
- in the project directory type ``./test tests