Skip to content

SwannG/tictactrip

Repository files navigation

Tictactrip Assignment

Required

  • Docker
  • Docker Compose

Development

Once you have Docker and Docker Compose installed

make build-dev
make up-dev

The server should be running on http://localhost:4000/

Production

make build-prod
make up-prod

The server should be running on http://localhost:4001/

Tests

make build-test
make up-test

See the Makefile for more commands

API

Authentication token

curl --location --request POST 'http://localhost:4000/api/token' \
--header 'Content-Type: application/json' \
--data-raw '{"email": "[email protected]"}'

Justify text

curl --location --request POST 'http://localhost:4000/api/justify' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: text/plain' \
--data-raw 'some text to justify'

Online API

Authentication token

curl --location --request POST 'http://swann.fun/api/token' \
--header 'Content-Type: application/json' \
--data-raw '{"email": "[email protected]"}'

Justify text

curl --location --request POST 'http://swann.fun/api/justify' \
--header 'Authorization: Bearer <your token>' \
--header 'Content-Type: text/plain' \
--data-raw 'some text to justify'

About

Tictactrip assignment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published